Questions tagged [batch]
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.
16
questions
199
votes
5
answers
625k
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?
12
votes
8
answers
10k
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 ...
3
votes
10
answers
7k
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
1
answer
340
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 ...
26
votes
7
answers
104k
views
How to create a never expiring password & user via net user through .bat file
I am using a .bat file to create a user and password at windows operating system level.
The issue am facing is when i pass EXPIRES:NEVER for password, when the user is created, it doesn't have "...
20
votes
4
answers
51k
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.
13
votes
8
answers
71k
views
Program does not run properly as Scheduled Task
Situation
I have a batch script that prepares some files, executes a program (.exe) and then deletes said files.
This task should run hourly, so I'm trying to configure this using Scheduled Tasks. ...
6
votes
6
answers
6k
views
shortcut for Eventvwr > Connect to another computer
I was wondering if you can write the following action in a batch command?
eventvwr (open the event viewer)
Menu Action > Connect to another computer
Type in the name of the computer.
Connect.
This ...
5
votes
2
answers
29k
views
rsync unexplained error & received SIGINT, SIGTERM, or SIGHUP
I created a batch script to back-up our server:
#!/bin/bash
user=$1
# create user dir
ssh [email protected] -p 5774 mkdir -p /var/backup/server.tst/incremental/$user
# backup mail dir
rsync -...
4
votes
2
answers
62k
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 ...
2
votes
6
answers
3k
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. I ...
2
votes
3
answers
15k
views
delete all folders with tmp in name using batch file
Have tried to google this, but I always seem to get results relating to .tmp files, which isnt really any use.
I have only a basic understanding of batch files, but I think I need something like this:...
1
vote
3
answers
18k
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
1
answer
3k
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 ...
0
votes
2
answers
662
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 ...
0
votes
1
answer
694
views
Group Policy applying only once?
For my own sanity can someone please advise why my GPO's to install application only works once? (both Machine level and User)
When I say once, I let the script install to test on a virtual machine. ...