Browsing Questions About batch (1)
Easy installation method for windows/ Batch Reference needed?
I have a bunch of files that I need to be able to transport and install quickly. My current method for doing so is moving a flash drive with a readme file of where stuff goes whenever I need to move stuff, which is rather inelegant and cumbersome.
My idea for a solution would be to write up a q…
What is a good windows batch scripting reference guide?
I have found a few guides to be incomplete and hard to follow. Can I get a recommendation for a couple good guides on this subject?
How to Pass Command Line Parameters in Batch File
I needed to pass id and password to a cmd (or bat) file at the time of running rather than hardcoding them into the file.
Here's how I do it.
@echo off
fake-command /u %1 /p %2
Here's what the command line looks like:
test.cmd admin P@55w0rd > test-log.txt
The %1 applies to the fi…
Automated script to zip IIS logs?
I'd like to write a script/batch that will bunch up my daily IIS logs and zip them up by month.
ex080801.log which is in the format of ex*yymmdd*.log
ex080801.log - ex080831.log gets zipped up and the log files deleted.
The reason we do this is because on a heavy site a log file for one d…
Can Windows' built-in ZIP compression be scripted?
Is the ZIP compression that is built into Windows XP/Vista/2003/2008 able to be scripted at all? What executable would I have to call from a BAT/CMD file? or is it possible to do it with VBScript?
I realize that this is possible using WinZip , 7-Zip and other external applications, but I'm look…
Any way to write a Windows .bat file to kill processes?
So every time I turn on my company owned development machine I have to kill 10+ processes using the task manager or any other process management app just to get decent performance out of my IDE. Yes, these are processes from programs that my company installs on my machine for security and complian…
How to loop through files matching wildcard in batch file
I have a set of base filenames, for each name 'f' there are exactly two files, 'f.in' and 'f.out'. I want to write a batch file (in Windows XP) which goes through all the filenames, for each one it should:
Display the base name 'f'
Perform an action on 'f.in'
Perform another action on 'f.…
What are options available to get cron's results and how to set them up?
I know that default cron's behavior is to send normal and error output to cron's owner local email box.
Is there other ways to get theses results (for example to send it by email to a bunch of people, to store them somewhere, and so on) ?
Copying from network share using BAT
What's the best way to copy a file from a network share to the local file system using a Windows batch file? Normally, I would use "net use *" but using this approach how can I get the drive letter?
Refer to/select a drive based only on its label? (i.e., not the drive letter)
I'm trying to refer to a drive whose letter may change. I'd like to refer to it by its label (e.g., MyLabel (v:) within a Batch File. It can be referred to by V:\ . I'd like to refer to it by MyLabel.
(This was posted on Experts Echange for a month with no answer. Let's see how fast SO answers …
Creating batch jobs in PowerShell
Imagine a DOS style .cmd file which is used to launch interdependent windowed applications in the right order.
Example:
1) Launch a server application by calling an exe with parameters.
2) Wait for the server to become initialized (or a fixed amount of time).
3) Launch client application by c…
How to pass password to scp?
I know it is not recommended, but is it at all possible to pass the users password to scp?
I'd like to copy a file via scp as part of a batch job and the receiving server does of course need a password (no, I cannot easily change that to key-based authentication).
TIA
Argelbargel
Batch file to delete files older than N days
I am looking for a way to delete all files older than 7 days in an MS-DOS batch file. I've searched around the web, and found some examples with hundreds of lines of code, and others that required installing extra command line utilities to accomplish the task. Similar things can be done in BASH in…
Open one of a series of files using a batch file
I have up to 4 files based on this structure (note the prefixes are dates)
0830filename.txt
0907filename.txt
0914filename.txt
0921filename.txt
I want to open the the most recent one (0921filename.txt). how can i do this in a batch file?
Thanks.
Batch renaming of files with international chars on Windows XP
I have a whole bunch of files with filenames using our lovely Swedish letters å å and ö .
For various reasons I now need to convert these to an [a-zA-Z] range. Just removing anything outside this range is fairly easy. The thing that's causing me trouble is that I'd like to replace å with a , ö wit…
Next Page >