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 quick script to move files around that I cou...
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?
...
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 first parameter the %2 (and here's the tricky part) ap...
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 day could be 500mb to 1gb so we zip them up whic...
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 looking for something that requires no external ...
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 compliance. What I'd like to do is have a .bat f...
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.out'
I don't have any way to list the set of ...
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) ?
...
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?
...
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 it )
...
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 calling an exe with parameters.
What is the...
Hello,
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
...
I am looking for a way to delete all files older than 7 days in an MS-DOS batch file. I've search 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 just a couple lines of code. It seems ...
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.
...
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, ö with o and so on.
This is charset troubles a...
I'm currently looping through a datareader and calling the System.Net.Mail.SmtpClient's Send() method. The problem with this is that it's slow. Each email takes about 5-10 seconds to send (it's possible this is just an issue with my host). I had to override the executionTimeout default in my web.config file (it defaults to 90 seconds) li...
Does anyone know of a windows commmand-line ( available on XP Pro or later by default ) that could copy a file while showing progress. I do not care if the progress indicator is in a terminal or a GUI window.
This is intended to be used during batch file scripting
...
I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do that? Any built in functions?
...
How do I make long commands go over multiple lines in a Vista/DOS batch file?
...
I need to create a batch file which starts multiple console applications in a Windows .cmd file. This can be done using the start command.
However, the command has a path in it. I also need to pass paramaters which have spaces as well. How to do this?
E.g. batch file
start "c:\path with spaces\app.exe" param1 "param with spaces"
...