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)

47
votes
3answers
108k views

How to sleep in a batch file?

How to pause execution for a while in a Windows batch file between a command and the next one?
-2
votes
1answer
241 views

shell script doesn't run correctly in cron [closed]

I want to call a shell script I wrote from a cron. The shell script uses the program Linkchecker. If I run the shell script from the terminal it works just fine. However, when cron runs I get the ...
11
votes
8answers
3k views

Expire Files In A Folder: Delete Files After x Days

I'm looking to make a "Drop Folder" in a windows shared drive that is accessible to everyone. I'd like files to be deleted automagically if they sit in the folder for more than X days. However, it ...
0
votes
2answers
25k 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 ...
0
votes
8answers
3k 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 ...
2
votes
2answers
1k views

Execute a remote command on a Mac from Windows

What's the easiest way to execute a single command on a Mac from a remote Windows machine, via batch? I would like something that works without a preset configuration (like SSH credentials) on either ...
1
vote
1answer
1k views

Migrating ODBC information through a batch file

I am a desktop support technician currently working on a large scale migration project across multiple sites. I am looking at a way to transfer ODBC entries from Windows XP to Windows 7. If anyone ...
1
vote
3answers
9k views

Send a batch file to a Windows machine, and execute it

I know PsExec is perfect for sending files over a computer on a network and then execute it on that remote computer, however I can't use PsExec because I'm developing a piece of software and I can't ...
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
279 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 ...