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)

30
votes
3answers
56k 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
219 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
2k 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
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 ...
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
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
3answers
6k 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 ...
0
votes
2answers
234 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 ...