Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

2
votes
1answer
46 views

check and warp newest files added

How am I going to automatically check all the files that were added to the directory and then warp it immediately?Because everyday I am downloading hdf files and warping it from time to time is a ...
2
votes
1answer
34 views

How to add addional IP addresses to an interface through batch file

I have assigned a IP address to my LAN interface through netsh int ip set address "LAN" static 192.168.0.99 255.255.255.0 192.168.0.1 Now I want to add 192.168.4.20 with gateway 192.168.4.1 to the ...
2
votes
2answers
260 views

BAT file: Delete all files in directory older than 5 days except one file

I have a directory with many temp files. All files older than 5 days can be deleted except one file 'DoNotDelete.txt'. Therefore I should add an extra argument to my current script: forfiles /p ...
2
votes
1answer
881 views

Opening local batch file from Chrome bookmark

I have a batch file located at C:/bat.bat on the C drive of my Windows 8 system. I created a Chrome bookmark that points to the URL file:\\\C:\bat.bat. When I click the bookmark, Chrome shows the ...
2
votes
3answers
491 views

bat file behaves differently when run from windows scheduler

I have a .bat file S:\BACKUP_db\copytofileserver.bat, which takes some files and zip them to the network drive. Its first command is to delete the old backup at specific network path, then pack the ...
2
votes
1answer
138 views

how to shift all parameters in a batch

The well-know shift command can be used to shift positional parameters in batch file, BUT it does not affect the special variable %*. The shift command has no effect on the %* batch parameter. Is ...
2
votes
1answer
46 views

Attempting to end CMD after Batch File

I am running a Batch file on which is located on my DC. explorer.exe = taskmgr.exe end; end; The batch file works fine and does what I need. The thing is that when I run this batch it forces the ...
2
votes
1answer
492 views

How to avoid mkdir path redirected to SysWOW64

I'm tring to create some directories (dirs) using a .bat file. At the cmd.exe, I can create the dirs normally, but when runing the commands inside a .bat file, for some odd reason, the dirs are ...
2
votes
1answer
447 views

Making PowerShell assume the working directory of a called Batch file

I regularly work interactively with a batch script that I can't easily change. One of the features of this script is as a navigation aid - it understands my company/product's code layout conventions ...
2
votes
2answers
292 views

Automate Windows scanning feature

I have a rather older Canon scanner Pixma MP 110. Of course, Canon does not provide any useful drivers (their site is really desperate, frustrating and useless in all means) - the only software I ...
2
votes
2answers
339 views

Ansicon vs. Batch File

I am attempting to make a colored command prompt in Windows 7. Using ansicon, I have successfully managed to create the prompt. However, when I put the commands into a batch file, I receive an ...
2
votes
0answers
45 views

Printing pages to different feeds (pdf) WINDOWS

We are currently sending out letters that print: Letter on letter-head (customized for recipient) Instructions on regular paper (customized for recipient) These letters are all sent automatically ...
2
votes
0answers
1k views

Batch file to move/compress/delete files

I am trying to write a batch script that will run automatically daily to do the following: Move files older than 2 days to from the main directory (Jason) to an archive directory. Zip files in the ...
2
votes
3answers
3k views

How to set to a variable, the result of a expression

I need to extract the date of a file, for then use this string as part of the name of a new file. I trying to solve this using the next commands: First I get the details of the file and redirect the ...
2
votes
1answer
440 views

.Bat File to Change Wifi Connection to Public Connection [closed]

I need to create a .bat file that will set a wireless connection, eg MyNetworkName, to a public network, so it won't be on Home or Work. I have searched and I don't know how to do this.
2
votes
0answers
738 views

Command line switching

I have read through some suggestions but I am just not technical enough to get this I think. I am a CAD designer and each file has 5 files associated with it. I have 3 sets of 5 files, and each set ...
2
votes
2answers
3k views

How can I set a time-limit on a batch file?

I have a batch file that calls an external program that periodically hangs. What I would like to do is set a time limit on the batch file / CMD prompt such that it automatically closes after a ...
2
votes
2answers
14k views

How can I refresh my PATH variable from the registry, without a reboot, logoff, or restarting explorer?

I've made some changes to the %PATH% variable in the registry. Now, I'd like to see those changes applied without having to go so far as a logoff, reboot, or reload of Explorer. Is there a way this ...
2
votes
1answer
106 views

Is there any way to send messages from the command line in Vista?

I was doing some tutorials on batch scripting when I came across a command prompt messenger tutorial that explained how to message someone directly from their computer. I followed the tutorial and ...
2
votes
2answers
366 views

on Windows, create shortcuts with specific attributes

I'm looking for a way of programatically ( from a batch file ) creating shortcuts to cmd ( or other command line utilities ). This can be easily achieved using SHORTCUT.EXE ( found in ENVARS.EXE ), ...
2
votes
3answers
701 views

Is there some way to universally address the default Program Files folder in Windows 7/2008 via .BAT file?

I'd like to write a batch file, where some commands target items in the Program Files folder, that is naturally cross-compatible from Windows XP up to Windows 7 x64 and Server 2008 R2. However, the ...
1
vote
1answer
5k views

Batch File, PING, errorlevel and > null what do they do?

This seems like a really easy question (running Windows 7). But I have looked for the answer and couldn't find anything at Microsoft's sites (XP PING & Everything else PING) or from a bunch of ...
1
vote
2answers
26k views

Create new directory with batch file (MKDIR not working)?

I tried using at first a combination of xcopy and del, but del kept failing. xcopy creates directory if it doesn't yet exist. The other option is to use MKDIR but it does not work inside a batch ...
1
vote
2answers
290 views

Having problems writing a list of simple commands in a batch file

I am trying to run a few simple batch commands in one batch. For that matter each command is a batch command as follows: rails generate scaffold illness name:string rails generate scaffold ...
1
vote
2answers
680 views

How can I pass gui batch arguments in Windows XP/7?

Is there any straightforward way to call a .bat file and have it prompt me for each of the arguments that will replace the %1 %2 and so forth fields? I can memorize their order just fine and run it ...
1
vote
3answers
735 views

Backing up all pictures from a harddrive

My uncle gave me a harddrive to recover from. The harddrive is perfectly intact and no problems with it. I plugged it in and XP allowed me to go in using My Computer. Now the thing is the data is ...
1
vote
3answers
8k views

Batch file to delete folder and its contents

I'm trying to write a batch file that would loop through a directory and delete any folder that is called "SAMPLE". Here is my code so far, any help would be greatly appreciated! @echo off title ...
1
vote
3answers
1k views

How can I create a popup in Windows with the results of a command called in a .bat file?

I'm calling an exe in a .bat file that returns quickly and I'd like to popup a message box with the results of the text so I can read it (after the program has ended). My .bat looks like this: ...
1
vote
3answers
234 views

CMD copy command

how can I copy all .png files in my current directory to a folder in my current directory called "src"? I tried this code: copy .*.png /src and it didn't work for me.
1
vote
2answers
114 views

What are the slashes with letters (/b, /m, /e, /p, …) used for?

What are the slashes with letters for – as seen in set /p or for /f etc?
1
vote
2answers
28k views

How to extract part of a string, in Windows batch file?

If I have a variable in a batch (cmd) file that looks like "Abc_123", and I want to end up with a variable that has just "123", is there any built-in way to do this? I'm not terribly picky about the ...
1
vote
1answer
87 views

A .bat file to close two services running in background

I have a Windows 7 computer with three accounts (in hierarchical order): Administrator (with password) type Administrator Guest (with a password different from that of Administrator) type ...
1
vote
2answers
526 views

How can I zero-pad numbers in a Batch FOR loop?

I am writing a batch file to do some operations on remote computers in my building. They are all named with the same prefix, but the number at the end changes (01–65). I tried to follow an online ...
1
vote
1answer
2k views

Batch file equivalent in Linux

I have a few basic commands that I need to run on a Red Hat Linux 5 Virtual Machine with GNOME to start a couple servers. Example cd /home/user/scripts sh runTHISthing.sh pub cd /home/user/logs ...
1
vote
1answer
3k views

Displaying and storing Windows Batch file output

I've got a batch file written that runs a program we've developped, passing in a number of parameters. Whilst running the program in debug mode, a large number of debug messages are output, which it ...
1
vote
2answers
38 views

Why is SET PATH= not working in the same batch file?

I have a USB flash drive with portable installs of Dropbox and emacs. One of the functions I want to run in emacs needs to have sha1sum.exe in the path, so I also put coreutils on the USB. I am ...
1
vote
2answers
102 views

Ampersand in Windows Password

I have a password for a Perforce account which contains an ampersand (&) and when I try to use certain P4 commands, I get the following error: Perforce password (P4PASSWD) invalid or unset. I ...
1
vote
1answer
44 views

How to have a batch call another batch based on its location?

I have made a file I will put up for download. It involves one batch file calling another. Most of the time this is not a problem, but in my case I have no clue where they will download it. So how ...
1
vote
2answers
67 views

.bat file doesn't work with comments at top?

I have a .bat file I made to combine multiple files into a new file and it previously looked like this: copy /b ^ E:\file1.txt+^ E:\file2.txt+^ E:\file3.txt ^ E:\output.txt :: comment That worked ...
1
vote
3answers
2k views

CMD keep running program

This isn't very googleable, and other than writing prog.exe -params several times in a batch file (which would obviously only work as many times as I wrote it) I can't think how to repeatedly do this. ...
1
vote
3answers
8k views

Start programs via command-line, but only if not already running

I came up with the batch file below, and it is working great. However, I would like to know if there is a way to code it so that if a program is already running, it would skip it and launch the next ...
1
vote
1answer
548 views

Open PDF to a certain page?

I need a batch file command to open a pdf with the Acrobat Reader on a certain page. "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" <PageNumber> <DocumentName> Thanks.
1
vote
1answer
24k views

Close command prompt after executing batch file [duplicate]

I have this in a .bat file (windows 7): taskkill /F /IM CouchPotato.exe TIMEOUT /T 5 CouchPotato.exe exit (The couchpotato tends to crash alot.) The command prompt stays open until the process ...
1
vote
3answers
2k views

How to get the Visual Studio installation path in a batch file

Normally, the path is something like C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\. From Visual Studio, one can use $(VCInstallDir)$ to get this path. Q: But in a batch file, how to get ...
1
vote
2answers
242 views

CD command not returning correct results under FOR loop

The CD command returns the current directory, and the %CD% variable returns the same result in an environment variable: c:\Temp\test\test1>cd c:\Temp\test\test1 c:\Temp\test\test1>@echo %cd% ...
1
vote
2answers
3k views

Why use start over call when using batch files?

It appears that I can use either start or call to execute batch files however am unsure why you would use one over the other. What are the benefits?
1
vote
1answer
4k views

Better-quality FFMPEG conversion from MTS to AVI

I got the following code from some forum. I'm a beiginner, so please bear with my questions ... I need to convert a video from MTS to AVI in very good quality. Currently I'm using the following code ...
1
vote
3answers
383 views

Dump HTML from script

Is there a way to create a script to download the HTML source to a text for html file locally? For example, if I wanted to archive the HTML of Google.com each day. I'm up for batch, VBS or PS1 but ...
1
vote
1answer
1k views

Why doesn't the bitsadmin.exe download manager work for me?

Why does this bitsadmin command fail? bitsadmin.exe /transfer myDownloadJob /download /priority normal http://mirror.anl.gov/pub/ubuntu-iso/DVDs/ubuntu/8.04/release/FOOTER.html c:\Temp It seems ...
1
vote
1answer
824 views

Restarting server with bat file

I'm trying to make a simple bat file that restarts a server. It looks like this: shutdown -r -f -t 60 But all it does is loop inside the cmd window, printing the command > new line > priting the ...