batch

How to grab the names of all sub-folders in a batch script?

I just want to know how can I get all the names of the folders in a current directory. For example in my current directory I have three folders: stackoverflow reddit codinghorror Then when I execute my batch script all the three folders will print in the screen. How can I achieve this? ...

how to write a batch file to format excel?

i'd like to write a batch file that would open a static Excel document and format it (from say 10 pages to 2 pages, taking out the empty columns) so that it is print ready. any ideas on how to format the excel document using my batch file? It could be a .VBS file as well I suppose. ...

Using Delphi or FFMpeg to create a movie from image sequence

Hi all My Delphi app has created a squence called frame_001.png to frame_100.png. I need that to be compiled into a movie clip. I think perhaps the easiest is to call ffmpeg from the command line, according to their documentation: For creating a video from many images: ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi ...

What does the @title batch script command do?

I see it a few times in my batch script, however I'm not certain what it actually does. The two occurrences of it are below an @echo (which prints out the text following it to the console) and are exact duplicates of the text that is printed with @echo. ...

Is there a way to have a Windows shell script execute everything relative to its location rather than the location it was invoked from?

I'm aware of %~dp0, which represents the fully expanded directory that contains the batch script, but what I'm looking for is either: a method to invoke the batch script from Perl in such a manner that allows me to use the batch script without modification and have all directories in it be in relation to the batch script location a sin...

Batch : Checking the number of parameters

I'd like to make sure that when calling my batch, no more than 2 parameters are passed. Is there an easy way to check that, or do I have to call SHIFT as many times as needed until the parameter value is empty ? ...

Windows XP batch file concat

I'm trying to accomplish the following ridiculous task: I have a text file containing a set of fully qualified filesnames. I want to iterate through the file and append each line to a common variable, that can be passed to a command line tool. For example, the file might be: C:\dir\test.txt C:\WINDOWS\test2.txt C:\text3.tx...

running a batch file from oracle forms 6i using host

I am trying to run a batch file. the file is located here: C:\Program Files\Java\jre6\bin\getfile.bat I use this in oracle forms 6i: first i assign this path to a variable: tmp_msg := 'C:\Program Files\Java\jre6\bin\getfile.bat' then I use the host command: host( 'cmd /c' || tmp_msg, no_screen); This is exactly as I have it. It ...

Floating point division in a dos batch

Hi need to do a floating-point division in a dos batch. I didn't find a way to do it. Something like this : SET /A Res=10/3 returns a integer number. Is it possible to do it ? ...

Replacing characters in a text file with a batch file

Is there a way to replace some characters in a text file with a batch file? I didn't find any command to do that. ...

Calling a web service from a script or batch file

We have a financial product that has built in scheduling capabilities to run over night batches. This product can also use web services to kick off each batch as required. I want to know if it is possible to call the web services from a .bat file or another type of batch/script file. If this is possible then we can call the batch file ...

Launching an independent process from a .bat

I have a Hudson job that launches a .bat script file that itself launches my Jonas application server and a couple of other tasks too. The script is properly launched from Hudson on my slave, then my application server is started but at the moment my Hudson job ends the application server is killed. This is due to the fact that all the ...

VBScript! JScript! Wscript! ... oh my!

I need to write some scripts for WinXP to support some of the analysts here at Big Financial Corp. Please help me decide which type of windows scripting best fits my needs. My needs seem pretty simple (to me anyway) run on WinXP Pro SP2 (version 2002) not require my users to install anything (so Powershell is out. Likewise Perl, Pyth...

How to input a string from user into evnironment variable from CMD script

I want to prompt the user for some input detail, and then use it later as a command line argument. ...

Batch command to take only first line from input

I'm looking for a DOS batch program that takes a file: First input line Second input line Third input line... And outputs "First input line" ...

Windows batch file - The system cannot find the batch label specified

The Problem I'm having a problem with a DOS batch file and labels. I keep getting this error: The system cannot find the batch label specified What I've tried Two computers; a WindowsXP and a 2003 Server. Made sure it was encoded as ASCII Editted the hex code for the line continuation characters. Tried replacing all with CR ,...

NHibernate: is there limitation of batch-size to 10 items?

Hi! I am having a problem with NHibernate (SQL Server 2000, if it matters). It seems like NHibernate uses batch-size equal to 10 even if I specify 500 (but if I specify size less than 10, say 3 - it uses 3) <bag name="RiskTypes" table="CalculationQuery" lazy="false" batch-size="50"> <key column="CalculationID"></key> <many-to-many...

running bat file using windows schedualer

Hi there i wanted to run a .bat file in windows task schedualer, so i opened it, added a new task, browsed to the bat file, and... nothing happened. so i changed the timing to see if it'll run, and it didn't. next i right-clicked on the task and chose "run"- it didn't run. the file itself is only one line, basicly backups a folder to a ...

best way to automate updates installs

I wanted to know if there was a way to have an app automate to answer the questions.. I have created a batch file that starts the app in the start up folder. so I have 2 problems, one was deleting the batch file once it ran from that folder 2. answering the questions for the app? Is that even feasible? we don't have SMS which I was u...

Batch program script problem breaks with file names with spaces

The following is a batch script that calls mp3splt (a program that splits mp3s http://mp3splt.sourceforge.net/mp3splt_page/home.php) into partitions of 5 mins long. for /f %%a IN ('dir /b *.mp3') do call c:\PROGRA~1\mp3splt\mp3splt -t 5.0 -o output\@f+-+@n+-+@t %%a It breaks when the mp3 files contain a space. Can anyone propose a wo...