Batch processing is the execution of a set of commands or software programs without user intervention. A batch file is a text file containing a sequence of such commands or programs invocations.

learn more… | top users | synonyms

0
votes
1answer
23 views

Windows 7 Batch file to turn off firewall and restart computer

I'm trying to create a batch file to do as the title states. Currently, I have: netsh advfirewall set allprofiles state off sleep 30 C:\windows\system32\shutdown -r -t 00 This batch file restarts ...
1
vote
1answer
28 views

Disabling the “Windows cannot find '[foo].exe'” popups

When I use the start command in a batch script to launch a program, I expect that program to be launched asynchronously; this happens exactly as I'd expect it would if the program that I'm launching ...
0
votes
0answers
31 views

Batch to reassign drive letter based on volume name

I have a "WINPE" volume and I am trying to get a batch script that will assign it drive letter "Z:" Someone gave me the script below but it does not work for /f %%D in ('wmic volume get ...
-1
votes
0answers
17 views

How can I learn to use JSR 352 for Batch Processing? [on hold]

I've searched for several tutorials, but some guides require a baseline level of knowledge of used APIs, or assume that users have used prior batch clients, or vaguely delineate differences between ...
1
vote
3answers
31 views

Start a Command Prompt and then change the title of it via batch file?

I'm trying to start a command prompt via a batch file, echo some text, and change the title of the command prompt. I'm trying: start cmd /k echo This is a terminal /k title Terminal The echo text ...
1
vote
1answer
25 views

Terminate endless running process in a batch file

I am trying to find a way to automate a process with a batch file. The process is one that logs output to a file indefinitely until it gets a break (ctrl+c) command via the keyboard. I can't seem to ...
1
vote
1answer
17 views

change %i to %%i and nothing happened

I have a file with two columns of file name. The following command lists the content of the file. (for /f "usebackq delims=;" %i in ("C:\RENAME-ALL.txt") DO ECHO %i When I put the same command in ...
0
votes
1answer
104 views

How do you get the User Profile name in a Batch File without the complete path?

I've seen that you can use %USERNAME% to get the whole path but I just want to get e.g John Doe for use in mapping a network drive to specific folders named after the user profile names? e.g NET USE ...
2
votes
2answers
4k views

Batch convert all html files in a directory into pdf files in windows? [on hold]

I see one solution so far: http://www.htmldoc.org/ Are there any more out there which are suggested?
0
votes
0answers
29 views

How to make a batch command that list all the files in a directory?

I am relatively new to batch coding, and am trying to make a file that will list all files in a specified directory, with the size, is a directory or not, etc. Currently, what I have is: @echo off ...
-2
votes
2answers
37 views

\/?' was unexpected at this time error in batch file

I am trying to integrate a password generator into my batch file so that it generates multiple passwords. Unfortunately it give the following error: \/?' was unexpected at this time. The expected ...
-1
votes
0answers
9 views

How to record echo mssage displayed on command prompt using C#? [migrated]

I am using below function to call EAR_Encrypt_FTP.bat in C#. Is there any way to trace the echo messages dispayed in cmd.exe while running the batch file?? I need to process echo messages displayed ...
0
votes
1answer
26 views

Check whether FTP upload is successful or not using batch?

I am running below code in my ftpUpload.bat. If file is not uploaded to FTP server it should print "FTP upload is failed" but I am getting "FTP upload is successful" for both cases. What change I need ...
0
votes
0answers
30 views

Batch - reading a file one character at a time

I am still new to Batch and would like to know if there is a way to read special characters from a batch file one character at a time. So if my file had <<>> or something like that and it ...
0
votes
2answers
139 views

How to make batch file to open specific Profiles in Google Chrome

I have .BAT batch files to open a set of programs, web pages and explorer windows. With sufficient Googling I've still come up short as how to execute the profile target "C:\Program Files ...
1
vote
1answer
24 views

Print multiple .bat generated passwords to a .txt file

after searching this site for "how to generate a password with CMD" I found some very useful examples. Then, I wanted to be able to print more then one password at a time (who would want to click all ...
0
votes
1answer
160 views

Add Date-Time Stamp To Copied File using Windows Batch

I thought this would be simple but it seems more of a challenge than I thought. I want a file to be copied and pasted with a time stamp appended. I get the time stamp using this code: set ...
1
vote
2answers
7k views

Command to run an application with Administrator privileges, but NOT AS administrator (prompt with UAC)

I want to start Notepad with elevated privileges to edit C:\Windows\System32\drivers\etc\host. Notmally I would type notepad in the search box, and with the program highlighted hot Ctrl + Shift + ...
2
votes
1answer
80 views

Batch command to archive folders with content using WinRaR

I have lot of folders in the root "C:\Test\Archiv\" (more than 1000). To be more specific, I get one every hour. They are named as following : ay %year% m %month% d %day% h%hour% In each folders are ...
0
votes
3answers
30 views

How do I delete a part of a file name for a batch of files in Windows 8.1?

I have lots of files in a folder but they all start with a line of numbers and are separated from the actual file name by a "_" For example: 123123123_filename.txt 456456456_filename2.txt ...
0
votes
1answer
29 views

How to delete the profile AD attribute using dsmod or similar?

As part of a user management batch script, I need to delete the profile value from an AD User object. The syntax I'm using is as follows: dsquery user -name TEST | dsmod user -profile "" It ...
0
votes
1answer
403 views

How to write a batch file to delete subfolders less then 10MB?

I have a folder, "myFolder". In "myFolder", I have many subfolders. I know that if the subfolder is less than 10MB, it can be deleted. Instead of checking the folder step by step, how can I write a ...
-1
votes
0answers
19 views

Which internet downloader support impot list of URL and FILENAME? [closed]

I have list of URL like this: <?xml version="1.0"?> <DownloadItems> <I filename="D:\cat\blue.zip" url="http://domain.com/file_abc.zip" /> <I filename="F:\f\big.pdf" ...
0
votes
4answers
3k views

Handbrake: How to batch convert videos including resize?

I am using the latest Handbrake v0.9.9. I would like to batch convert 200 video files from format 800x600 to 640x480. The problem is, if I add the videos to the Queue (clicking on >Source >Folder), ...
0
votes
3answers
33 views

Count files in a folder and subfolders from the command line

How do I count all files of a given type (eg. *.mp3) in a designated folder (and optionally subfolders) from command line into a environment variable? (no PowerShell please, just batch commands)
0
votes
1answer
52 views

Run a command in all sub-folders in a batch file

I have a batchfile that looks like this: IF EXIST icon.ico ( attrib -S -H -R desktop.ini echo f | xcopy /H /Y "%~dp0desktop.ini.txt" desktop.ini attrib +S +H +A desktop.ini ) This works ...
0
votes
1answer
24 views

Using paths with a spaces in batch script

How do I make something like this work? SET DIR=c:\program files (x86)\dir\ %DIR%callee.exe Normal solution, which is to use double quotes around the value of DIR variable works, but results in ...
2
votes
2answers
112 views

How do I detect the number of parameters to a batch file and loop through them?

Is there an easy way to detect the number of parameters passed as arguments to a batch file, and then use for /L to loop through them?
-2
votes
1answer
18 views

Any other useful 3rd party command line utilities such has SendEmail.exe? [closed]

I'm looking for other useful tools like SendEmail.exe to use in my batch files. Such as ones that I can call form a batch file that can do something you normally couldn't do from batch. For example, ...
-4
votes
3answers
49 views

Extract text from every three lines using Windows

I have a HUGE text file with details of my site users. (11GB+). It's built like that: Email: example@gmail.com Address: 1blahblahblahblah (Bitcoin Address). Password: blahblahblah Each of the ...
-1
votes
1answer
34 views

How to set variable's value inside if block when value includes parenthesis

I am having problem in setting value inside if block. Please consider the following code : \mytool.bat @echo off if not "%adder%" == "" ( set val=%val%;%adder% ) else ( echo please set adder ...
0
votes
3answers
53 views

How to access folder path from first input parameter and how to call IF Loop in batch file?

@Echo OFF SET FilePath=%1 SET HeaderFilePath=%2 SET RetrunCode="0" Call :sub %FilePath% exit /b :sub SET FileName=%~n1 SET FilePath=%1 SET "FileType=.zip" CALL SET ...
-1
votes
3answers
25 views

Windows 8.1 Batch File Default App

I am making a batch file Contains this @ECHO OFF adb install %1 pause exit I want to make this batch File Default App for .apk files.Is Windows Send Parameters When You Open a file?If not Please ...
0
votes
2answers
1k views

Setting CMD CD to the directory that the batch was run in

I'm trying to create a batch script that will open a program in a different environment (so I can make a portable version of it). I use this set APPDATA=%CD%\data to tell it to do that. The problem ...
0
votes
3answers
2k views

Batch script to append record to csv files

I have a bunch of stock data in csv's that I am backtesting trading strategies on. The problem is that my strategy buys the open market price if a signal was found yesterday, unfortunately my data is ...
0
votes
0answers
34 views

Wake up computer from sleep to shutdown

I wonder if it is possible to wake up the computer from sleep at a certain time during the day and shutdown automatically. Maybe giving a popup asking for 5 seconds if I am using the computer to give ...
3
votes
1answer
58 views

How can I move the oldest file in a directory repeatedly using a batch script?

How can I move the topmost (oldest) file in a directory one by one in a batch script (Windows 7)? I am using this script: :backup move something somewhere timeout 36000 goto backup I want to ...
1
vote
1answer
102 views

Batch file can't delete a file “that's in use” but the file doesn't seem to exist?

I have this simple batch script: cd "C:\Users\me\AppData\Local\Microsoft\Windows\Temporary Internet Files" del *.* /f /q pause When I run it, it tells me that it cannot delete \Temporary Internet ...
0
votes
2answers
32 views

How can I break a batch script that is executing a ping without terminating the whole script?

I have a batch script that continuously pings an address and I want a way to cancel the pinging but not terminate the whole script (alternative to ctrl^C).
0
votes
2answers
27 views

Prefixing output text in batch

I am trying to create a remote, WMI query script that will query a bunch of machines and tell me the MemoryChip configuration information. This way, we can find out what machines physically have 1 ...
0
votes
2answers
33 views

How to insert a newline for every occurrence of the word abstract_ using BATCH

I have an xml I need to edit using batch. How do you insert a newline for every occurrence of the word abstract_ in the whole file? Here's a line in the xml (9999999x.xml) <related-object ...
0
votes
1answer
27 views

How to set a folder name into a variable to use it in the same Batch file?

i want to make a batch file, This Batch file must look out, into a folder with the name "Draft" and for every sub-folder will be make a search for a .txt file "list.txt" and when finds this .txt file, ...
1
vote
1answer
105 views

Can't run batch file in Server 2012

This site rocks! I am trying to run a simple .bat file on Server 2012 that will ping another server, filter out all the lines except one, and then write to a file for later use (I then want that file ...
3
votes
2answers
74 views

How to open a batch file and execute a command AFTER opening command prompt

I am trying to create a batch file that first opens command prompt and then executes "prompt $t$gEnter Command Here$g". I have tried starting it with "%windir%\system32\cmd.exe" and then using ...
0
votes
0answers
17 views

Execute local commands from remote server using Xshell.

I usually use Xshell on windows to access my Linux server. Every time when I want to copy a PDF file from Linux, I need use sz file.pdf to copy the file, then locate and open the file on Windows. How ...
2
votes
1answer
35 views

Checking if a key is present on the windows registry through batch file

I work as IT Support for public service. Some of the jobs we have to do on a regular basis is to install some software developed by our own developers. We usually do it as procedures, in which in ...
3
votes
2answers
8k views

Batch delete : Access is denied

As the title suggests, I'm having issues with the del command in a batch file. When it gets to the delete step I get the message "Access is denied". My batch command looks something like this. set ...
1
vote
1answer
33 views

how to identify the process for a batch file run through a vbscript

I used this forum to figure out how to run tomcat batch file silently/hidden using vbscript. The code I used is this: Set oShell = CreateObject("Wscript.Shell") Dim strArgs strArgs = ...
0
votes
1answer
39 views

Is it possible to make a VBScript which executes a batch script within itself?

I know it sounds strange, but my idea is creating a single text file which contains a VBScript and a Batch Script within it, i.e. if I run that script as a VBScript, it calls itself as a Batch script, ...
2
votes
2answers
20k views

Batch File - Delete Shortcut From ALLUSERS Desktop

In Vista/7, if I try to delete a shortcut using the following command -: del "%allusersprofile%\Desktop\MyShortcut.lnk" ...Windows sees this folder as empty and doesn't delete the file. The ...