batch

Double-Quotes in start line of Windows Batch script

I have looked at the answers already provided, but I'm still stuck. Here is what I currently have: start "" "C:\Program Files (x86)\Spark\Spark.exe" echo Spark started This works fine. But now I want to pass parameters to the client, which must be wrapped in quotes. I can do the following on the command line: "C:\Program Files (x8...

Permanent line at the bottom of the console window in batch files

Hi guys, Just wondering if anyone knew if it was possible to have a permament line of text at the bottom of a cmd prompt window when running a batch file? So it floats, and if there is a lot of text flowing on the screen, and the cmd prompt starts to scroll, that line of text is still there at the bottom. Cheers, Tim ...

how to add ftp users to an apache from PHP?

how do i go about adding ftp users to an apache web server? i need the user to register from normal web/script and then have an FTP account set up for them automatically. I have seen the cPanel API, and it is pretty decent, but since cPanel costs money, i don't wish to use it for this project. I'm also reluctant to use any other lisence...

Reading values from file and assigning it to variable in batch script

Hello to all, I want to read the file which contains the value of some variables which are used in my batch script. I have created a property file with format key=key_value key=key_value Now, I want to set environment variable's name as key and its value as key_value How can I assign? I have read the file but cannot separate the st...

How can I specify Batch commit in Oracle Merge Statement?

I am doing a bulk insert/update for millions of records using the MERGE statement in oracle. Well, the other options could be to use FORALL making use of BULKCOLLECT and then commit but this operation will be again a slowdown the performance since I need to keep loop. Committing after completion of entire merge operation will be a perfor...

Preprocessor to add functionality to Windows's CMD?

I need to do a fair bit of scripting in my job as a SQL Server DBA. Sometimes, I need to deploy a fix script to a very restricted environment, where the only option for scripting may be DOS Batch. In one such environment, even VBScript/WSH isn't a possibility, let alone PowerShell. Anyone who has written enough batch files on DOS and Win...

Using Sharepoint ProcessBatchData to add an SPListItem to the subfolder of an SPList

I'm using the following command to insert an SPListItem to the root folder of a Sharepoint list using SPWeb.ProcessBatchData method: <?xml version="1.0" encoding="UTF-8"?> <ows:Batch OnError="Continue"> <Method> <SetList Scope="Request">ac8e81a0-7e38-4094-a15c-2714e43bb994</SetList> <SetVar Name="Cmd">Save</SetVar> <SetVar...

VB GUI Interface to run VBS Script.

Hi Folks I have a VBS script which I need to run on a monthly basis which captures file information suhc as file Name, Type, Date Modified and more. When I processes each file it saves it all onto a CSV file so that I can process it on Excel. To run the script I setup a batch file .bat The issue is I need a GUI interface of some sort ...

How do you run a command line program (like lame or svn) with PHP?

Specifically, I need to automate the encoding of audio files into mp3 with LAME. You don't need to know LAME to answer this, I could be talking about svn or some other program.. I know how to use LAME on the command line to do this, for one file at a time. I would like to do this via a php script however, so I can convert a bunch at o...

How to do multiple things to each file in a directory with a batch script

This is a direct extension of this question: http://stackoverflow.com/questions/180741/how-to-do-something-to-each-file-in-a-directory-with-a-batch-script From the above I leaned how to execute a command for every file in a folder. How do you execute MULTIPLE commands for each file? I want to first use lame to compress the file, then...

Change or swap the CSS of multiple HTML elements at once

I have about 100 <span class="foo">, 100 <span class="bar"> and 100 <span class="baz"> tags in my document. I need to implement the following operations in JavaScript: Change the background all foos to red, all bars to green, all bazes to blue. Change the background all foos to green, all bars to blue, all bazes to red. Change the back...

'reg' is not recognized as an internal or external command, operable program or batch file.

I'm running a batch file command on a server which is using reg query to find out the procesor_architecture of the machine(AMD64 or x86). And I'm getting this error, does anyone know what could be the issue. And what all things have to be checked first before running this command on that specific server. This is the command: reg quer...

shutdown.exe parameters with dashes or slashes?

I use a call of shutdown.exe to reboot machines having different versions of Windows installed. For Windows XP the command is: shutdown.exe -r -f -t 01 For other versions of Windows I use: shutdown.exe /L /R /C /Y /T:1 Now it seems, that the second command won't work on Windows XP. Does anybody know which versions of Windows suppo...

link a batch scrript (.bat file) to a different console/shell on Windows XP?

Hi All, Is there any way to link batch script (.bat files) so that they run via another shell/console and not cmd.exe ? For instance, if one install powershell or others (a few are open-source projects are available on soureceforge), how to link it to your bat files ? I looked in the "file types" menu but it seems that the bat extensi...

Create event with the batch files

Hi All, Here's what i want to achieve. We have this email archive database which we optimize on a weekly basis . At the moment we are manually logging in run the command and monitor the status. The optimization can take anywhere between 3-12 hours which is making us login every few hours and check if it has finished or not etc. What i w...

Windows batch assign output of a program to a variable

I need to assign the output of a program to a variable using a MS batch file. So in GNU Bash shell I would use VAR=$(application arg0 arg1). I need a similar behavior in Windows using a batch file. Something like set VAR=application arg0 arg1. Thanks! ...

How to set up multi-threading in Spring Batch?

I've successfully set up a tutorial Spring Batch project. I'd really like to know if it's possible to make it multi-threaded at the "Spring level". The basic idea of what I want is to make a list of tasks or task steps and let them be picked up and worked on by independent threads, ideally out of a pool limited to 'n' number of threa...

Batch File only works right when user inputs yes to both questions.. otherwise it crashes..

Hi, I asked a question here earlier today and got that fixed, but now I have another problem.. My batch file is supposed to take the user input of a directory and then save all of the names of the files within that directory to a user specified name text file. It also has the option to allow for you to include or not include subdirectori...

How to Execute complex batch command on the fly

I looking the way to run DOS/windows batch directly from C# code without saving it as .BAT file before. I'm mainly interested to run DOS command with combination of stdin stream. Let's say I need execute something like that: echo 'abcd' | programXXX.exe -arg1 --getArgsFromStdIn After that programXXX.exe will take 'abcd' string as -ar...

How to run a python script without specifying the file extension (cross platform solution)?

Let's say that we have a Python script do.py and we want to be able to call it without extension, like do or ./do. If we rename the file from do.py to do and assure we have a valid shebang line it will work for all platforms but Windows. On Windows there is no way of executing file without extension. On Windows, if we keep the origina...