Text file containing a sequence of commands or program invocations that does not need user intervention.

learn more… | top users | synonyms (1)

0
votes
1answer
390 views

Making a batch file to hide the local disk drive

I have made batch file that can run diskpart but I want to do the following commands: diskpart> list volume diskpart> select volume 2 diskpart> remove letter d
1
vote
2answers
389 views

Creating a drag and drop batch file to split an MP3 using ffmpeg

I've got a folder full of FFMPEG batch files that I've written to do various conversion tasks. These allow me to drag and drop a bunch of files and do a conversion - for example, decompressing MP3 to ...
2
votes
2answers
2k views

How to create a script to disable the shutdown button on Windows 7

I want to create a script in command prompt that will permanently remove a user's right to shutdown a machine. I've done it before, but in Windows XP, and many years ago, and I think I did it in Group ...
0
votes
1answer
365 views

Script for modify file content in specified files

I tried searching previous questions but none worked or I couldn't adapt them to my needs I want to write a script that asks for: folder criteria old string new string And replace every file in ...
0
votes
1answer
319 views

Set enviroment variable setx

I am setting a environment variable with setx(win7) in a cmd , that I started from a batch file, if I close the shell an open a new from batch file again and use Set command to check it, I do not get ...
0
votes
1answer
529 views

How to run batch file without admin privillege? [duplicate]

I am newbie to batch file script.I have created simple windows bat file.The problem is bat file run only if the user has admin privilege.But i want to run this batch file for all users like normal ...
1
vote
2answers
46 views

How can I copy identically-named files out of a series of folders, and append the folder name to the filename to disambiguate?

My source folder contains directories containing files like this (each file has the same name): dir1\f dir2\f dir3\f ... I would like to copy all files named f to another directory, renamed as ...
0
votes
2answers
139 views

Batch script to create folder with permissions

I need a batch file able to create the following folders on a windows XP system with read/write permissions: /Documents and Settings/John/Local Settings/Temp/Folder1/Folder The file may need to ...
0
votes
2answers
2k views

Removing Trailing Whitespace in .txt file

How do I remove a trailing whitespace on each line in a .txt file in following command? I created script below to remove 1st character in each line but this creates a whitespace at the end of each ...
2
votes
1answer
2k views

How to run a process in the background without keeping a batch file open?

I have a Windows service (the Bamboo integration server) that runs a batch file as a subprocess (a build job) of that script. Within that batch file I would like to be able to start a process (let's ...
0
votes
3answers
2k views

run a windows bat file on startup

I have a server access where I want to run some bat files in startup that can run automatically for any user. The problem is Other users are unable to run this file and it is required to be run as ...
1
vote
1answer
541 views

Unattended installation of multiple programs through batch file

I can install the software by setting auto=1 in install.inf and then use the following script: @echo off for /F "tokens=2 delims=<>" %%i in ('type test.xml ^|find "<install>"') do ( set ...
1
vote
3answers
2k views

Batch File Check Directory exists in x64 and/or x86

I need to be able to run this batch fine on both x86 and x64 machines to check if a program has been installed correctly . We have an app that installs in x86 in the standard program files directory, ...
1
vote
1answer
2k views

Batch file to install TotalCommander without User intervention

I am new to windows batch file. Here is my first attempt in batch file. Here is my requirement: I should have batch file. When executes, it should read the XML config file for the software list to be ...
-1
votes
2answers
109 views

Batch command backup in different folders

I am trying to create a backup for assassins creed 3 save game for every x minutes , but the folder & its files overwrites every time ,please suggest me a code so that each backup will be in ...
1
vote
1answer
83 views

Windows 7 CMD: processing folders ignoring those starting with a “.”

I want to find a folder whose name starts fld-. FOR lets me use wildcards: for /D %%f in ("fld-*") do set FOLDER=%%f However, with the following folders: .fld-blah\ fld-blahblah\ afld-blah\ it ...
1
vote
1answer
230 views

Make a bat file want for a program to be running then launch another one

I am currently trying to create a batch file that launches some programs for me. This could easily be done with the command "start" but the last program it runs only works if the first one's window is ...
-1
votes
1answer
778 views

Safely remove a USB drive using bat file [duplicate]

I would like to be able to programmatically safely remove a USB drive, given a drive letter. This is actually to be implemented in an application, but I figured that if it can be done using a batch ...
1
vote
1answer
400 views

Deny running batch files

How can I deny users of my network to run any batch files in their user level? I want it to return them an access denied message OR delete the script entirely. Any ideas?
0
votes
0answers
121 views

How to make ping less verbose

I want to make ping less verbose for my batch script, but I do want it to show time-out messages and other errors. This is what I've got so far: @echo off :BEGIN time /T ping 127.0.0.0 -n 1 | find ...
0
votes
1answer
109 views

Move command from bat file opens another window

I have a .bat file that moves a file; however, it is also opening the file in a new window, which I don't want it to do. Is there a way to avoid opening a new window or at least an option to close the ...
1
vote
1answer
1k views

Break Batch Script Execution during Pause

I'm developing a complex, long-running batch script, and came upon a little issue when debugging. I have a command-line window open to the root path of the script, so I can type myscript.bat to fire ...
-1
votes
2answers
175 views

Moving and rename a file by its directory name

I want to create a .bat file that moves an excel file to specific directory and rename the excel as is the folder name. UPDATE: The idea of all this is that I want to copy an file, named below ...
0
votes
1answer
195 views

Is it possible to escape a carat(^) out of a quoted variable?

I have a batch file I set up that is using a SQL command that is passed into a command file. When I call this variable however, the line doesn't show up. I receive a "SQL command not recognized" ...
0
votes
1answer
1k views

Batch Scripting - How to delete a subfolder (files/folders) over several directories

I need a batch file to traverse a directory structure that looks like this C:\CruiseControl\ProjectArtifacts\ProjectName1\Logs C:\CruiseControl\ProjectArtifacts\ProjectName1\Src ...
0
votes
1answer
185 views

Switching between networks with a laptop

I currently switch between three different networks using my laptop. One at home, my office in Sydney and my office in Hong Kong. All three require different network settings and configurations. I am ...
1
vote
1answer
158 views

Set “Start In” directory for a shortcut using batch commands

I've created the following shortcut for my software using a batch file. set target_file_a=\\%server_name%\program.exe @echo off set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs" echo Set ...
2
votes
1answer
515 views

Start MySQL from the command line without losing prompt

I'm on Windows 7. I'm trying to run a .bat file where I stop and start MySQL and run some other commands. However, running "C:\Program Files (x86)\EasyPHP\binaries\mysql\bin\mysqld.exe" results in ...
-1
votes
1answer
191 views

How can I prompt for a destination folder in a batch file?

I have a hard time making a batch file that will copy a file and let the user input the destination of where the copied file will be saved. It should look like this: file to be copied: target drive: ...
-1
votes
1answer
184 views

Traversing through subdirectories and create simillar directory structure & then process each file in sub directories [duplicate]

I want to create a batch script to process the directory and files in that directory, Basically I am using one tool to convert files in directory to some format and it can take each file separately ...
0
votes
1answer
320 views

How do I append dynamic number of spaces at the end of a string in a batch file

I want to output information to a log file as such 01/08/2013 14:30 - Dynamic-Machine-Name - Message starts 02/08/2013 07:12 - DynamicMachineName - Log entry 02/08/2013 07:14 - ...
0
votes
1answer
275 views

Scheduled task returns 0xFF, but works ok

The batch file converts mpg to avi and runs on a schedule. Although the batch works ok from the schedule, Scheduled Task returns the 0xff message. Running manually, it displays an exit code of 0. I ...
1
vote
1answer
614 views

7zip - compress the contents of each folder in a directory

I basically want to compress each file in each folder, delete the original file and leave the folder uncompressed. I don't want to compress the whole folder, only the contents in it. That, with 7zip ...
0
votes
2answers
606 views

How do I copy multiple files from multiple directories to a single directory, but only copying new or edited files?

I work on my laptop to create a number of files of varying formats in nested sub-directories. Other files also exist in these directories that I am not interested in copying. Essentially, I want to ...
-3
votes
2answers
159 views

How I can continue a .bat file after closing the CMD? [closed]

I use Windows' Command Prompt to encode an "Anime video" -- but it takes about 10 hours to finish! I can't leave the laptop for 10 hours, because I use it in my work. I want a method to close the ...
1
vote
1answer
769 views

Standby (Sleep) CMD [duplicate]

I wanted to know how to standby (sleep) from command prompt for Windows XP. Using this CMD command C:\WINDOWS\System32\rundll32.exe PowrProf.dll,SetSuspendState 0,1,0 didn't work alone. The only way ...
-3
votes
1answer
49 views

Batch Files: -actions parameter - Is it a valid param? [closed]

I am running a batch file containing the following: C:\Utilities\FDD_TEST\FDD.exe -actions=C:\Utilities\FDD_TEST\FDDBatch.cfg But it fails to run. Is the -actions parameter a valid parameter? If ...
0
votes
2answers
1k views

How to grep multiple strings on multiple files?

I am trying to grep multiple strings on multiple files. This is on Windows 7 x64, and I am using GNUWin32's flavor. I have grep.bat with this command: grep "string1\|string2\|string3\|string4" ...
0
votes
1answer
392 views

Batch file to prompt UAC like Run as administrator [duplicate]

How can I get a batch file to prompt for UAC on Windows Vista to Windows 8 to run with Administrator rights - that is - other than right clicking on the batch file and hitting "Run as Administrator"?
0
votes
2answers
7k 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 ...
0
votes
1answer
202 views

Bash script: kill instances before re-executing

I've got a batch script I use to jump start my development environment. It looks like this :: Update checkout git pull :: Compile code with Maven call mvn clean install -Pui :: File for a program ...
0
votes
1answer
274 views

Run batch file command on an exact String Query with a date stamp

I want to create a batch file that executes a command, but before the command is executed, it must look up a log to see if it contains the following line: DOFWADX 2013/07/24 15:42:33 -I- DATABASE IS ...
0
votes
0answers
579 views

Task Scheduler (run whether user is logged on or not)

I'm having a problem with scheduling a task in Windows 7 I m creating a task which is mapped to a bat file to execute, here is my .bat file : cd "C:\soft\" Start excel "" "AD Auto Run.xlsm" its ...
1
vote
3answers
3k views

Batch file to ZIP only files in directory or sub directory

I wanted to know if possible how to create a command line to do the following - if a directory exist ZIP only the contents into a ZIP file. If a directory has sub-directories ZIP only the contents ...
-5
votes
1answer
150 views

windows 7 batch file for swapping filenames randomly

I need to write a batch file that goes into a folder and randomly swaps (renames) all the filenames. This folder has about 1000 files. So it is acceptable if there are few misses.
1
vote
1answer
269 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.
0
votes
1answer
260 views

batch - pass full path name as one argument [duplicate]

I am writing a batch to call a .exe file which is made by C#. However, the C# program reads one of the parameters incorrectly. Here's my code in the batch file: start "" "example.exe" %cd% para1 ...
1
vote
2answers
4k views

Dump batch script output into a text file without specifing batchfile location beforehand

Im aware that i can get the output this way (to capture both standard and errors): [batchFilePath] > [logFilePath] 2>&1 Or this way for standard output: C:\MyBatchFile.bat > ...
0
votes
1answer
95 views

How can I issue the 'prompt' command from a batch file in a Windows command prompt?

I want to specify a custom command prompt when I launch a console. E.g Windows cmd.exe. I am using the /K command line parameter in the shortcut that launches the console: ...
0
votes
1answer
138 views

Compare 2 files and copy if different

I have a set of 24 files with 24 different extensions that I want to copy to a backup directory and append the date in the filename if they are different from the previous version of the file. I made ...