batch

In cmd.exe, how can you get one variable to escape the setlocal command?

I frequently find myself using setlocal within cmd.exe to avoid polluting the environment variable space with temporary variables (and to ensure both command extensions and delayed expansion are active). However, I'm at a loss on how to do this if I actually want one of those variables to be made available. Consider the following code ...

how i can pass a file directory (path) as parameter ?

how i can pass a file directory (path) as parameter to 1. batch file in windows operating system 2. bash file in unix oprating system ...

Schedule Task : 6 months from now

Hi guys, I'm tryin' to find a way (from a batch file) that I can use to create a scheduled task that will execute 6 months from now. I've looked all over the net, and I'll I've come across is AT and SCHTASKS that will schedule the task monthly .. I'm looking for a solution that will execute this task every 6 months. I know this will r...

Escape characters in batch scripts

I have the following script to automate uploading a file to a remote server. The problem is that the password I have been given is full of special characters which are killing the login process. Here is a changed version of the characters. j7~]%&X When using a normal ftp app there isn't a problem. I have wrapped the password in ...

How to send SMS from a batch script?

Is is possible to send an SMS message out of a batch script in Windows? Any SMS gateway, that supports it? etc. ...

Running batch file remotely using Hudson

What is the simplest way to schedule a batch file to run on a remote machine using Hudson (latest and greatest version)? I was exploring the master slave setup. I created a dumb slave but I am not sure what the parameters should be so that I can trigger the batch file in the remote slave machine. Basically, I am trying to run 2 differen...

Batch script to get website ip address?

I'm trying to put together a batch file, that will ping a website, and assign its ip to a variable - I've searched around, but haven't really been able to put something together. Can anyone shove me in the right direction. Tim. ...

Batch convert on Mac OS X html files to UTF-8 with Unix (LF)

I am on a Mac OS X with Snow Leopard. I need to batch convert a lot of .htm files that were originally created on Windows to UTF-8 with Unix (LF) line breaks. I can batch rename all of the files .html with NameMangler. I can do a search/replace of all of the files to update all hyperlinks to reflect the extension change to .html u...

<a name="whatever"></a> deprecated Batch convert to id

I have a lot of old html files that I need to update. Hopefully, not manually. I can use a find/replace app to go through a directory and find all with <a name= and replace it <span id= since "name" is deprecated. How would I then find all of the correct endtags and convert </a> to </span> without ruining all hyperlinks? TIA, Linda ...

Group file to New Folder?

I have to copy files, make a new folder and then paste those files into the new folder so often. I wonder if we can make a batch file or vbscript file to perform this task? Just select the files and choose "Group to New Folder" from the context menu. That'll be awesome! ...

Batch (xcopy all files to folder) with loop

hello, can anyone help me with loop in batch for windows? i want make script that will allow me to do something like this: 1. copy all folders and files from Drive I: to X:\folder0001; 2. when done display: "Done"; (i ejected cd) 3. "enter" to next copy; 1. copy all folders and files from Drive I: to X:\folder0002; 2. when done display...

BATCH FILE to remove duplicate strings containing Double Quotes; and keep blank lines

BATCH FILE to remove duplicate strings (containing Double Quotes); and keep blank lines Note: The Final Output must have original strings with Double Quotes and Blank lines. I have been working on this for a long time and I can not fine a solution, thanks in advance for your assistance. When I get the remove duplicates working somethin...

svn export from post commit does not work on window?

Hi Everyone, I am setting up a SVN server in a windows environment: Whenever a tag is made, the post-commit script export a certain number of information about the tag (like author, comments, dependencies ...). I also want to attach specific files from the tagged repository. To do so, I have been trying the "svn export" commands. This ...

avp.com scan pipe error when using ssh -n command ?

i have the following case :- i design :- 1- file.bat on windows 2003 2- file2.sh on unix-aix file2.bash call file.bat and file.bat receve path from file2.bash and file.bash return a value to file2.bat .... when i execute this from my servers all thing good but when i call this from my website (PHP) the following error appear :- ER...

Batch File to Delete Files in Folders

I have many folders in a directory that contain various files. Each filename begins with XXX_ where XXX could be the name of the folder the file is in. What I am needing to do is to go through all those folders and delete any file where XXX is the name of the folder that file is in. ...

Rename files using batch

I have a folder with files x_blah.blah y_ho.hum z_hi.ho which I just need to drop everything to left of the underscore and the underscore from so I'm left with blah.blah ho.hum hi.ho ...

Post build script returning errorlevel 255

I currently have the following script as post build on a project: if $(ConfigurationName) == "Debug (x64)" || $(ConfigurationName) == "Release (x64)" (goto :x64) if $(ConfigurationName) == "Debug" || $(ConfigurationName) == "Release" (goto :x86) :x64 copy "$(SolutionDir)References\x64\System.Data.SQLite.dll" "$(TargetDir)System.Data.SQ...

Batch script: Search if a folder contains any files

Hi, I am trying to get a batch script to check whether a folder contains any files in it. So far this is how far I have got: IF EXIST %FILEPATH%\%%i\FromGlobus\%FILE% ( %WINZIP% %FILEPATH%\GlobusEOD\ExtraFiles\%ZIPFILE% -m %FILE% IF errorlevel 1 goto subBADEND ) where %FILE% is *.* but what happens is it tries to zip up files even ...

Disable network connection using batch file

I need to enable/disable network connections on windows with a batch file. ...

how to increase the input line length(max) in windows?

in my one batch file i set a variable, after running this batch file it shows the error "The input line is too long." how to overcome from this problem. or it is possible to increase the input line length(max) in windows? ...