Text file containing a sequence of commands or program invocations.

learn more… | top users | synonyms (1)

2
votes
3answers
434 views

runas domain access?

I want to execute a file on a share but I need to use a domain account to access it. I've tried runas /user:domain\user \\someshare\foo.exe. It prompts for the domain account's password, which I ...
3
votes
1answer
3k views

How do I disable a wired network interface using Windows batch scripting?

How do I disable a wired network interface using Windows batch scripting? What commands do I need to use?
0
votes
1answer
448 views

Creating batch file for applications on network servers

Every day, I use two programs, so I would like to try and create a batch file to load these programs with one click of the mouse, i.e. by clicking on an icon on the desktop. The path to one of the ...
0
votes
2answers
4k views

Having a problem executing .bat file (sub-menu) through .bat file (menu)

I have created a batch file menu (named "menu.bat") which lists three sub-menus linked to their respective batch files, as follows: Network Functions (networkfunctions.bat) Control Panel ...
1
vote
2answers
2k views

Windows XP logon script batch file [closed]

How can I write Windows XP logon batch files? Do you have any examples of such files?
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
3answers
403 views

bat file for backup system

I created a sample bat file in order to have a back-up system. this does not show what my intention is but it demonstrates it. here is my bat file content; xcopy C:\apps\source c:\apps\dest /D /E /C ...
10
votes
1answer
6k views

how to escape pipe symbol | in bat scripts?

I need to echo commad usage like this in batch script named command.bat command.bat on|off I cant use echo %0 on|off I know I can use echo "%0 on|off" but it puts quotes along Is there any ...
2
votes
1answer
1k views

Batch file close/kill a System Tray/systray program

I use a program for hosting multiple forms. Each form leaves a systray program of said program. In Processing they all use the same same. But Window wise/mouse over name while in tray they use the ...
0
votes
1answer
1k views

How to write a `.bat` script to change folder security automatically?

Currently I'm trying to deploy BugNET application on my machine following their official document. One of those steps is to change the security property of the published folder proceeded as below ...
1
vote
2answers
2k views

How do I check if a program's instance is running or not, before running that program?

I am looking for a software (could be as a BAT script) that could check if a program's instance is running or not, before running that program. And if the software / script detects that the program is ...
0
votes
1answer
4k views

Outlook 2010, command line options for exporting some settings

For Outlook 2010, are there command line options I can use to export safe senders and rules using a simple bat file? (There are 2 sets of rules. 1 set for an Exchange account and 1 set used for ...
2
votes
3answers
3k views

Rename folder according to mp3/flac tag information

I would like all folders in my music collection to be renamed with a date, which is tagged in the music files inside them. Basically, change Dire Straits - Money For Nothing in Dire Straits - 1988 ...
0
votes
1answer
419 views

Cleaning up FIND header information in batch file

If I use FIND (WinXP) like this: FIND /I "blahblah" test.txt > test2.txt The first two lines are header information: CRLF ---------- TEST.TXTCRLF (The CRLF aren't visible of course). Is ...
5
votes
1answer
1k views

Environment variable for volume names in Windows?

I'm trying to write a batch file that will look at the volume label of the current drive and report if it's not equivalent to a certain string. Is there a default variable in the shell for this? Can ...
0
votes
2answers
1k views

See error code in bat file

In windows prompt i am launching an app. I'd like to see the error code it returns. How do i display it?
3
votes
1answer
8k views

How to excute commands over SSH in a batch file?

I'm looking to, all in the course of one batch file: ssh into a remote computer execute commands (per the batch file) on the remote host. What options do I need to add to the ssh invocation so ...
4
votes
1answer
3k views

Windows batch file reference to own directory

Suppose you have C:\foo\foo.bat which needs to refer to C:\foo\foo.txt. It may be run from a different directory, but needs to get foo.txt from its own directory, not the current directory. Obviously ...
2
votes
2answers
4k views

Batch processing multi-TIFF in Irfan view

I have to convert DPI of more than 5k Tiff images on a monthly basis from 200x200 to 100x100. I can do that in Irfan view using a .bat file that i have created.. the following is the .BAT file code ...
0
votes
3answers
3k views

Running Java from a Windows batch file causes the batch file to stop

When I run Java from a Windows .cmd file (Vista 32-bit here), the Java command causes the batch file to stop executing additional commands. For example, this is a simple test.cmd file: java java ...
8
votes
5answers
33k views

How do I echo a TAB char on a command prompt

On a windows batch file, what is the proper way to echo a TAB? echo A<TAB>B<TAB>C I know I can type the TAB char between entries, but most editors will display it as a sequence of ...
0
votes
1answer
730 views

How to run a batch file to run at any user log in to Ubuntu 10.04

Please help me create a batch file that I want have it configured every time any user logs in to my personal computer (there are couple of non-admin non-root users) Another concern is that this should ...
5
votes
3answers
5k views

Starting services in batch file on windows 7

I have a fairly simple batch file which does just one thing - "net start myservice". This batch file gets shortcut-ed in a program group by installer so that users can simply click on the icon and get ...
0
votes
1answer
686 views

how check all of my file copy correctly by batch file?

I have a batch file that copy all the files from src place to dest place. I used xcopy command. Now I want to make sure all of my file copy correctly and delete all the files in src folder, do you ...
2
votes
1answer
2k views

execute batch file in invisible mode [duplicate]

Possible Duplicate: Run a completly hidden batch file How do I execute batch files at startup so that I won't see the cmd like black window. I have this batch file which I use to attach vhd ...
2
votes
8answers
7k views

Why do I have to import .reg file from RegEdit in Win7 and not from .bat file?

I have a .bat file that makes a call to a .reg file (something like: regedit mytest.reg). I run the .bat file as administrator but I get an error: "Cannot import mytest.reg: Error opening the file. ...
1
vote
2answers
30k 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 ...
0
votes
1answer
154 views

Questions about using a .bat file

(using WinXP) I've not written a batch file before. I want to create a shortcut for using virtuelenv. I normally have to open a shell, type C:\some-path-to-my-env\Script\activate.bat. Then I have a ...
5
votes
3answers
304 views

Start up computer in the morning

We are requested by management to shutdown all systems when we leave in the afternoon, any system left on is consequently shutdown by the cleaner (pulls the powercord i guess). What I hate though is ...
1
vote
1answer
323 views

how find list of file by batch file

I need a batch file to find all of my *.sql file in specefic folder and its subfolder like "c:\aaa\" and by using xcopy copy the latest version of them on other folder like "c:\bbb\" would you help ...
1
vote
2answers
2k views

Running batch file through a service

I'm trying to schedule a batch file to run through a third party application, however the output file doesn't get created in the directory. If I run the .BAT file from the command line, it works ...
43
votes
7answers
98k views

How to check if a directory exists in Windows?

I would like to translate this Linux/Bash script to Windows shell: if test -d myDirName; then echo "ok"; else mkdir myDirName; fi It tests if a directory exists, and if it doesn't it creates it.
1
vote
3answers
762 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 ...
2
votes
2answers
374 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
1answer
870 views

PowerShell or batch script to delete with exclusions

What's a good way to delete everything below a certain path, supplying a list of exclusions? E.g. C:\ MyFolder MyApp MyConfig MyWorld MyEverything ...
0
votes
2answers
302 views

How I can provide list of the file in my directory?

Hi I need a batch file that provides a list of all of my files in my folder that are separated with a ";" in one file. Like list of my directory: dir1 dir2 a.txt b.sql c.html Export file ...
0
votes
2answers
10k views

How to run bat file in background? [duplicate]

Possible Duplicate: Run a completly hidden batch file I have a bat file that open a window and show a lot of information, which bother me a lot. How could I run the bat file in background?
1
vote
1answer
3k views

How can I stop/start a java application from the command prompt?

I've got a Java application, that I startup from the command prompt using a .bat file, contents look as follows : cls rem Starting app set CLASSPATH=.;.\lib\ title App1 starting java app/StartMe ...
2
votes
1answer
1k views

Use a batch file to kill LogMeIn Free?

When I connect to my media PC using LogMeIn Free, Windows 7 Media Center shuts down because it doesn't work over a remote desktop connection. This isn't too much of a problem for me as it's the same ...
0
votes
2answers
113 views

problem in batch file

I'm trying to run this code: Set a = "c:\a" set b = "c:\b" xcopy /d /y %a %b But I don't know why it cannot recognize the second path. The export in cmd is like xcopy /d /y c:\a Does anyone know ...
4
votes
4answers
28k views

7-Zip CMD: Add current date to archive and include only the last modified folder in archive

I'm trying to create a backup script with 7-Zip. I have everything else done already, but these two issues are still blocking me. Firstly, I want to add a timestamp with a create date like this: ...
0
votes
3answers
1k views

windows 7 task schedule / mysqldump

Ive created a batch file to create a dump of a database and save it in a file with the current date as part of the file name. The batch file works brilliantly and all the data is saved correctly. ...
17
votes
1answer
13k views

How to create batch file that delete all the folders named `bin` or `obj` recursively?

I have the need of deleting all bin & obj folders in a folder on my PC. So, I'm thinking of a batch file to do that but I'm not famaliar with batching file in Windows. Please help. [Edit] After ...
3
votes
3answers
9k views

Dump contents of a cmd prompt into a file, from a batch file

So, I have this batch file that runs every morning at 7 AM and does some work in a Windows command prompt. What I need this batch to also do is save the output of the cmd prompt work that was ...
1
vote
4answers
11k views

What is 7-Zip’s command-line argument to create a self extracting archive?

I looked everywhere and couldn't find a straight answer from anyone. If I want to package the contents of C:\Temp into a file called Temp.exe (in 7z format) that is self-extracting, how do I do it ...
1
vote
3answers
4k views

win 7 home premium - run batch script on logoff / shutdown

is there a way to run a batch script on logoff or shutdown in windows 7 home premium? [edit] to add a bit of context, im looking to delete everything from my downloads folder when i logoff, so unless ...
7
votes
4answers
27k views

Sleeping a computer via batch file in Windows 7

I want to make a batch file that will sleep my computer after a period of time. The closest thing I have found is placing it in standby, but seems to work differently than the sleep button on my ...
61
votes
9answers
143k views

How to run a batch file without launching a “command window”?

On Windows XP, can I run a batch (.bat or .cmd) file, via a shortcut, without a "black window"?
0
votes
2answers
450 views

Print the file name with another extension (Batch-program)

Batch-program launchs with 1 parameter (full path to file) program.cmd "C:\Path\To\File\Filename.txt" Now, this program consists of 1 command: echo %1 And it just prints an argument: ...
0
votes
1answer
1k views

Batch file - copy file from parent folder - why the cmd file closed adter the run?

I'm using this code to copy files from the parent folder. But as soon as the code finish the execution, teh CMD window is closed. So I cannot read the result to see what the problem is. Here is my ...