Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

2
votes
2answers
1k views

Is it possible to have scripts that trigger whenever an IM is received in Microsoft Lync?

I've just upgraded to Lync 2013, and I'm considering using it instead of Pidgin+SIPE. One of Pidgin's many nice features is Growl integration... and I would miss that. There are no Growl plugins for ...
5
votes
4answers
12k views

How can I start a batch script before logging in?

I have set up my computer to boot at the same time everyday when I am not home. I need it to run a batch file without anyone touching it right when it boots. I have added a shortcut to the file in ...
0
votes
1answer
1k views

Batch file: Open cmd, run VS Command Prompt, execute Makecert

I need to do this in a batch file: Open cmd Run VS Command Prompt via cmd Execute this command "makecert -sv SignRoot.pvk -cy authority -r sha1 -a -n \"CN=Certificate\" -ss my -sr localmachine ...
1
vote
1answer
4k views

Using the taskkill command with a timer?

I using a custom .bat file that closes my chrome browser, but can't seem to find information on what syntax I need to add in order for the process to end after a given amount of time. Can anyone, at ...
5
votes
2answers
5k views

How to run a windows .bat script with wine from command line?

I'm trying to run a batch script from my mac terminal using wine (in order to provide arguments to a windows executable and piping output). so far I've tried executing wine runme.bat but ...
1
vote
1answer
616 views

Get current directory when running remote batch file

Hello I have the following batch file saved to a location called C:\.alias. I added this directory to the path so that I can run all my custom scripts. I have tried creating a script to open a file in ...
0
votes
1answer
144 views

writing a file list to a text file but don't want the directory name

I'm trying to write a quick batch program that will either copy the names of the files in a folder or that folder and the sub folders. The issue I'm having is: I don't want the directory names. Here ...
0
votes
1answer
1k views

Delete a character from an argument passed to a batch file

Suppose in a batch file, say receive.bat, is called with some arguments. Now receive.bat executes and it needs to process these arguments. Sometimes (but not always), an argument will end with a ...
2
votes
1answer
1k views

How can I add a value to the registry via command line without a .REG file?

I have a need to add my external IP address to the Windows registry on a scheduled basis, and I want to do this with a bat/cmd file to automate the process. I was able to use the advice from this ...
3
votes
4answers
5k 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 ...
2
votes
1answer
23k views

Pass a path with space to a batch file as a parameter

In first.bat, I use var5=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\ CALL scripts\vc64.bat %var5% And in scripts\vc64.bat, I use SET var6=%1vcvarsx86_amd64.bat CALL ...
0
votes
2answers
237 views

Can't make batch file to start a second .bat

I have this code @echo off cd c:\windows\System32 for /f "skip=3 tokens=1" %%i in ('TASKLIST /FI "USERNAME eq %userdomain%\%username%" /FI "STATUS eq running"') do ( if not "%%i"=="svchost.exe" ( ...
0
votes
1answer
13k views

Batch file to copy files from desktop location to another location?

I want to Copy/Move files in Windows XP from Desktop(a Folder) to My Document(another Folder), which was created by same Batch File on Current Date in Format DD/MM/YYYY. This is working fine when ...
1
vote
1answer
1k views

Windows XP/7 copy command line involving junction

I have a batch script which needs to work with Windows XP (for the time being) and Windows 7. The script also copies a link to the Windows Desktop. copy /Y path\to\the\link.lnk ...
1
vote
1answer
3k views

Batch rename files to numbers with leading zeros [duplicate]

Possible Duplicate: How do I rename a bunch of files in the Command Prompt? I'm coming back to Windows after several years in Linux (I'm a trucker, and the company I just leased my truck ...
0
votes
1answer
64 views

Fix location to run this script?

I have a batch file from Karan. How to fix location to run this batch my file location is C:\proview\upload\EJ_daily_Temp. path=c:\program files\7-zip;%path% for /f "tokens=1,2 delims=_" %%i in ...
0
votes
2answers
5k views

Using Call SET to Designate a Variable in a Dos Batch “For” Loop

Trying to use the Call SET to set a variable in a windows batch file loop. Not working but here is the input / output file. trying to assign Var C to equal 1. Batch file: @ECHO OFF for /f ...
6
votes
3answers
13k views

how can I make my .bat file continue after an error

I have a .bat file in windows that does three things cmd1 arg1 arg2 cmd2 arg3 cmd3 arg4 arg5 arg6 Sometimes cmd1 can fail and that's fine, I would like to carry on and execute cmd2 and cmd3. But ...
0
votes
1answer
364 views

run interactive program from Window CMD script

I have a CMD script to run on Windows. It does DEL, but the shell would ask "Are you sure?" How do I make the script answer 'YES', or better yet, just does a silent DEL ? Thanks
1
vote
2answers
3k views

How to make a batch file to search all drives?

How can I get this batch file to read all physical and mapped drives? It works fine with C: but will not read any other drive. @echo off set filePath= for /R c:\ /d %%a in (*) do if exist ...
0
votes
1answer
6k views

How to use IF ELSE and IF NOT conditions in the same batch file?

Using a Batch For backing up a directory (Chrome). I'm using the native Windows Schedule Task Manager to ping, run the file (working great). However, if I go to bed (forgetting to shut down Chrome), ...
1
vote
2answers
299 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% ...
0
votes
1answer
784 views

How to rename and extract all file?

Looking for a .bat to rename and extract all. The folder is d:\EJ\%dd%-%mm%-%yyyy%\ (multiple files) K02699_ej.zip K02702_ej.zip K02703_ej.zip K02704_ej.zip K02705_ej.zip Rename to K02699.zip ...
0
votes
1answer
3k views

How to get Windows language programmatically? [closed]

I need to install some version of one package depending on the SO language. How can I get it using a batch file? I'm using W7 professional.
2
votes
1answer
1k views

Open multi files with batch file

I have a trouble when I open multi images with Irfanview . It only opens one file, and after I close the window, it opens next one. I want to open three windows instantly. I hope someone help me out. ...
0
votes
2answers
577 views

rename multiple file add number to name using batch

I have files in folder named unix_aaa.txt unix_bbb.txt unix_ccc.txt and so on. How do I change all the files that start with unix to names like 001_unix_aaa.txt 002_unix_bbb.txt 003_unix_ccc.txt ...
0
votes
1answer
352 views

I am trying to zip files individually, but the file type is unknown

I am trying to zip some files with an unknown file type individually. I am using the following code in a batch script to do that: @ECHO OFF FOR %%A IN (bestbuy*nat*component.cpi*) DO "C:\Program ...
5
votes
4answers
24k views

bat file to disable ethernet adaptor and then reenable it after windows log in

When I log into Windows 7 I need to wait 10 seconds and then disable the Local Area Connection (ethernet adaptor) and then reenable it. I have looked through the suggested answer: Enable/disable ...
1
vote
1answer
689 views

Run batch file with custom drive mappings

I want to create a "mini virtual environment" to run a program. The only difference between my normal environment and the virtual one would be the drive mappings. I have an X: drive mapped to ...
0
votes
1answer
647 views

Is there a way to run a bat file whenever network connected?

I want to automatically pass the firewall whenever the network connected (WIFI and LAN), I have a bat file to do this, but every time I need to run it manually, so is there a way to run this bat file ...
0
votes
2answers
832 views

How can I allow a user to choose directories to be copied?

I'm trying to write a batch file that is basically used for copying destinations. Now, I want to make it to where other people can use it without having to go in and edit the directories and ...
5
votes
2answers
10k views

How do I use a " (quote) as a FOR /F delimiter in CMD.exe on Windows 7

I want to have a .bat file get a list of all of the *.XML files in a Visual Studio project What I tried so far is to first use an old version of GREP: SET TempName=%temp%\TEMP%RANDOM%.bat ...
1
vote
2answers
5k views

How do I open a random file in a folder, and set that only files with the specified filename extension(s) should be opened?

How do I open a random file in a folder, and set that only files with the specified filename extension(s) should be opened? (While preferably, supporting Unicode filenames too.) I've already looked ...
5
votes
3answers
2k views

Why does “start winword” work but just “winword” doesn't?

Assume Microsoft Office is installed. Consider the following batch file: REM the following line successfully launches Microsoft Word start winword REM none of the following commands work to launch ...
0
votes
1answer
4k views

Multicolored Batch File

I have this batch file i wrote, and i wrote it to make specific words to be different colors, as a test. But so far, i can't get any farther than this, I'm stuck, and I was wanting to use it to make ...
3
votes
3answers
37k views

Creating a .bat file to execute mysql and other commands

I'm looking for a way to reduce the amount of typing I do to check mysql entries and other things. For example, I wanted to create a .bat file that will execute the following commands. mysql -u user ...
0
votes
1answer
353 views

Syntax error on running a batch file to replace files

I have a batch file intended to replace all instances of tracking.js within a folder/sub folders. FOR /R "D:\Virtual Servers (Testing)\CourseWare Master\Shared\Jenison\Version1.2\" %%I IN ...
1
vote
2answers
2k views

Batch script to rename portionof a filename

I've been trying to make a script that will a file name and change only one word in it. An example would be: projectname.vcproj.domainname.username.user to ...
0
votes
1answer
121 views

How can I write a bach file to relay a message across a LAN on boot?

What would a .bat file look like? in order to relay a message across a lan from Computer A - 192.168.1.60 to Server B - 192.168.1.7, in which the Server communicates with the computer to prompt once ...
0
votes
1answer
320 views

Running multiple commands in multiple prompts from batch

I currently have three batch files and am trying to combine the functionality into one. run.bat -------- start "" /min cmd /k first.bat start "" /min cmd /k second.bat first.bat -------- call ...
3
votes
2answers
398 views

Creating a txt file for certain type of files using batch

I have a folder containing all types of files. Let's say my folder path is E:/temp. I would like to create, only for the .avi type files, a txt file and name the txt file as the name of the movie. ...
2
votes
3answers
2k views

In Windows XP, how may I change the default browser from chrome to IE on the command line, without admin privs?

Situation: 1. Need to Set the default browser to IE via cmd(problem) 2. Need to do a Citrix login via IE(amounts to loading a url) because it wont run in Google Chrome 3. then set default ...
6
votes
4answers
9k views

Loading and unloading ISO files in Windows 8

I saw on one site that the new Windows 8 could load ISO images without the help of other programs. Is Windows 8 creating a new drive for every ISO? Or does it have one virtual drive to load all ISOs ...
0
votes
0answers
332 views

Bat file is not working in windows 64 bit?

I have written batch file for my project to use commonly for the both 32 and 64 bit environments of windows. %cd%\bin\prunsrv%ServiceVersion%.exe ^ //IS//ServiceName ^ --DisplayName="Service ...
1
vote
1answer
334 views

How can I kill a process using a Batch file without a minimising full screen application

Basically, I'm using a software called Xpadder that lets me control my computer with a game pad. Problem is, when I start a game I need Xpadder to end. So I typed this batch file tasklist /FI ...
3
votes
3answers
5k 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 ...
0
votes
1answer
2k views

how to overwrite existing file in ftp using wput.exe

How can I force to always overwrite an existing file in ftp using wput? Anyone? please provide the dos command line. Thanks.
2
votes
1answer
3k views

takeown /R not applying to hidden files

I'm running a batch command to take ownership of a set of user folders and I'm finding that the ownership is not being pushed down to hidden files, such as ~normal.dot I'm using the following command: ...
0
votes
2answers
767 views

How do I stop the command window from automatically closing at the end? [duplicate]

Possible Duplicate: Batch file that runs cmd.exe, a command, and then stays open at prompt I have a set of environmental variables that I have to run before I can run other operations. I ...
0
votes
2answers
863 views

Batch file toggle actions

I have two actions I'm trying to run using a simple .bat file. First time the file is run it proceeds to execute a command, second time it executes another... rinse and repeat. Without knowing the ...