A batch file is the name given to a type of script file, a text file containing a series of commands to be executed by the command interpreter under MS-DOS and Microsoft Windows.

learn more… | top users | synonyms (1)

1
vote
1answer
263 views

How to limit SMTP delivery to hourly batches

Moved over from StackOverflow. Sorry if you saw it there first In an effort to keep us from being labeled spammers by major ISPs (in addition to SPF records, privacy policies, CANSPAM compliance and ...
1
vote
1answer
87 views

Is there a way to create a custom installer package to do batch installs of a bunch of programs at once?

Basically I want to create a file which will automatically install a bunch of files without having to manually install each of them (i.e. Flash, Adobe Reader, MS Office, etc.). I'm guessing the ...
0
votes
2answers
224 views

Cron jobs in cascade array

If anyone it's like me and work even once with IBM Mainframe batch jobs, then it's possible that you know CONTROL-M, that is a tool to schedule jobs not only in a date and time fashion but also in ...
2
votes
6answers
916 views

PHP vs Batch file for mysql cronjob?

My server details: OS: Windows Server 2003 IIS6 Plesk 8.xx installed (currently using Plesk to set the cronjob) I need your advice. I have 2 methods: Method 1: Using php + mysqldump, create ...
0
votes
1answer
98 views

Plug-Start-Pull Windows batch script

I'd like to preface this by saying I'm not a system administrator at all, just a lowly Java programmer. However, I've been tasked with writing a batch script to be run on a sizable number of laptop ...
0
votes
13answers
28k views

Finding day of week in batch file? (Windows Server 2008)

I have a process I run from a batch file, and i only want to run it on a certain day of the week. Is it possible to get the day of week? All the example I found, somehow rely on "date /t" to return ...
1
vote
2answers
666 views

Reg Query Issues

I have a batch script that does reporting on our systems and part of it queries the registry for information. The script fails to get the key's value when its ran by the system, but whenever I run ...
1
vote
5answers
3k views

Quickest way to scheduled file deletion on Windows

I have a windows server machine that takes daily backup daily and each daily backup takes 1.5gb thus every night, I want to remove backup files that are older than 1 week. This is how my back up ...
1
vote
1answer
2k views

Calling a batch file using relative path

Oh gosh, gotta expose myself as a noob here ;) In Windows, I need to execute a batch file in a subdirectory of the working directory. However, just running subdir/foo.bat cmd1 cmd2 does not work, and ...
1
vote
1answer
1k views

'net use' error after 'rasdial' in batch file

I'm writing a batch script that does the following: rasdial - connect VPN net use - map a drive to a remote folder share (on the VPN) xcopy - copy a bunch of files from the mapped drive to the local ...
1
vote
1answer
577 views

Batch sending s/mime encrypted email - How?

I need to send some sensitive data periodically to a set of recipients via email. Due to the nature of the data, we need to send it encrypted. Some of our clients use PGP/GPG, so it's not an issue, ...
0
votes
2answers
17k views

Check free disk space using Batch commands

Is there a way already to check the free space of a hard drive in a batch script? I'd rather not use third party apps since I need to fill out a lot of forms, and in that case I think I'll write a ...
1
vote
2answers
389 views

Bat file in another account

I have a bat file which will delete files in some folder (Profile Folder). But i do-not have access to that folder. But another account has access to the folder. How to run a batch file from one ...
3
votes
5answers
1k views

Web interface for torque

Can someone recommend a good web interface for Torque? I'm interested mostly in monitoring the status of the job queues.
0
votes
2answers
2k views

Checking file properties in a batch script?

I have a batch file from a vendor to patch some software on a Vista machine. I'm going to be using GPO to push it out as a startup script. My problem is some systems require this software and some ...
4
votes
2answers
5k views

delete registry key using wildcards

I'm hoping to find a way to delete registry keys based on wildcards using a batch file rather than writing some vbscript. Does anyone have an example? I'm forced to proceed with MS's wonderful ...
2
votes
2answers
1k views

Setting Variables in Windows Batch Scripts

I need to set some variables based on an argument for a windows batch script. @echo off if [%1]==[] ( echo "Usage: xxx <AAA|ZZZ>" ) else ( if [%1]==[AAA] ( SET ...
1
vote
1answer
689 views

Running a windows batch script in a separate process

I want to start a long running process from a windows batch file. The start script should just call the second script and return, end. How can I achieve this? Thanks!
2
votes
2answers
5k views

Adding numbers stored in variables in windows batch script

I have a loop in a batch script and I would like to do some arithmetics with the loop counter. I found out how to evaluate expressions, how to add numbers here: ...
3
votes
2answers
2k views

Evaluating expressions in windows batch script

This one could turn out as the dumbest question ever, as I am probably missing out the obvious. Anyway, here it is: Can you evaluate expressions in a batch script. For example, I want to add two ...
2
votes
2answers
1k views

Batch file to call multiple batch files and keep going after errors

I have a batch file like this, the issue that I have is that if the first batch file fails, the second one never gets started, how can I get them to both keep going? @echo off MapNetworkDrive_J.cmd ...
12
votes
3answers
52k views

For Loop counting from 1 to n in a windows bat script

I need to run a windows command n times within a bat script file. I know how to do this in various programming languages but cannot manage to get it right on the windows command line :-( I would ...
1
vote
6answers
2k views

Copying Directory Tree on Windows

I need to copy a full directory tree (aka recursive copy) with a bat files on windows. On *nix systems I use the -R argument on the copy command, like so: cp -R fromDir toDir and that did the job. ...
0
votes
2answers
2k views

Create a batch file that deletes all user data folders except for All Users and Default User?

I am using Windows XP and would like to create a batch file that deletes all user data folders except for All Users and Default User. How can I achieve this?
0
votes
3answers
1k views

read an unknown directories name + copy to it

I would appreciate some help please. I am trying to copy two files "test1.txt" and "test2.txt" into an unknown directory, e.g. into the directory "%USERNAME%\Documents\test\04pql7hw.example" The ...
0
votes
2answers
453 views

Post-startup & Pre-Login shutdown

Is there a way [using a batch file] that I can set a system to shutdown PRE-login but POST-startup? I've tried a scheduled task to run this batch file with the "/SC ONSTART" flag .. That didn't work. ...
0
votes
3answers
2k views

Need to exclude a specific result from a Batch For Loop

I have a script that recursively loads files from a specific directory (and subdirectories) into a java classpath using a FOR loop. It looks like this: FOR /r directory %%F IN (*.jar) DO call :addcp ...
3
votes
1answer
16k views

cmd.exe: how to start a background process, run some things, stop background process

I want to run a batch script that: starts a background process (a Selenium RC server, if that matters); waits until the background process starts to listening some port (or wait a fixed amount of ...
0
votes
4answers
17k views

Command Line Winrar & Batch Scripts

I've written a wee batch script to backup some stuff on my desktop and dump it over the network to a share... The only thing that's bugging me is the verbosity of rar.exe while it's doing the ...
0
votes
8answers
2k views

Batch processing on Linux

We're currently setting up a server to some heavy lifting (ETL) after another process has finished within the business, at the moment we're firing off jobs either via scheduled cron jobs or remote ...
0
votes
2answers
5k views

Edit local user account remotely: set passwordreq:yes

I'm using Net user username /passwordreq:yes but I need to do this on a bunch of machines. I can run a batch through SCCM, but would like to do it with a script. Anyone have a way to do this? ...
8
votes
5answers
14k views

How do I extract all archives in the subdirectories of this folder?

How do I extract multiple archives in contained in subdirectories in a folder, outputting the results back into the folders where the archives are.