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

1
vote
3answers
96 views

Batch file - wait for another commands

To activate some commands from mozilla SDK I have to run batch file called "activate". I don't want to find the proper file each time I want to do something with this SDK, so I created batch file: cd ...
0
votes
0answers
745 views

Batch file change color of specific part of text

How could I change the color of a specific part of text within a .bat file? I currently have this: @echo off :a color 2 set /p command=$jp goto :%command% which produces a green "$jp". The text I ...
1
vote
0answers
48 views

Can I perform different actions in a windows batch file based on the most recent version of a program installed?

Some of our computers run multiple versions of Microsoft Access (97 & 2010) while others run 365. For the pcs running multiple versions, the default is set to 97. I have a batch file that is ...
-2
votes
2answers
66 views

MD5 wasn't changed?

I have 3 rar files (all with the same md5), and I use this code to change Md5: @echo off setlocal enabledelayedexpansion set /A Counter=0 FOR %%1 in (*.rar) do ( set /A Counter= !Counter! ...
0
votes
1answer
127 views

Batch script Issue passing path as paramter with spaces [duplicate]

go.bat @echo off set url=D:\Download\Path with space inside echo "%url%" pause output: C:\Users\Admin\Desktop>go "D:\Download\Path with space inside" Premere un tasto per continuare . . . ...
0
votes
0answers
18 views

exclude directories from ncftpput

I've got a .bat file with this command: ncftpput -R -u username -p password host remote/directory *. Basically, I want to not upload the following directories: libs/Smarty/ public_html/images/ ...
1
vote
1answer
3k 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
1answer
130 views

Problems using a batch file For loop to feed .tifs into a GIS process (gdal_polygonize)

Thanks in advance for your help with this. I've been reading, experimenting, and banging my head against the wall for a couple days on this, and could really use some assistance. This is my first ...
4
votes
1answer
80 views

Batch File IF Statement Time Taken

I am trying to write a batch file that takes the time taken of a command and converts it into hours, minutes and seconds. Here's what I've got: @echo off set /a sec=0 set /a min=0 set /a hrs=0 for ...
2
votes
1answer
1k views

Robocopy copy only changed files to new folder

I'd like to create a backup such as the following: C:/backups/20140101/ All files from source folder C:/backups/20140102/ Only files changed since last backup C:/backups/20140103/ Only files ...
2
votes
2answers
90 views

Speed up file search in a network path

I am trying to search in a network path inside a folder of 152.000 documents, list of files to be searched is 1500, after 5 hours it has only found 50 documents. This script was written by another ...
-1
votes
1answer
2k views

Shell files (*.sh) to batch file (*.bat) converter?

It's quiet tedious to convert shell scripts into batch files. Is there a way to automatically and easily perform .sh to .bat conversion or vice versa?
0
votes
1answer
70 views

DOS Batch script to iterate through NTFS drives

I need a Batch FOR loop that iterates through the driveletters of NTFS drives only. I found a way to do a FOR loop like so: for %%X in (C:\ D:\ E:\ F:\ G:\) do <bla> Obviously I could go A-Z ...
3
votes
3answers
822 views

Dash or Slash in batch file?

It seems that either a dash - or a slash / will work equally well in a batch file. The two examples below are equaly valid. Which is correct? Does it depend on the operation system? If so how do I ...
2
votes
1answer
54 views

How do I delete symlinks from a Windows folder with a batch file/script?

How do I delete all symlinks and only all symlinks from a folder with a batch file/script? The folder is c:\wamp\www, and this is what I've tried: Content files delete.cmd for /f "delims=" %%D in ...
-2
votes
1answer
54 views

Dos Batch: How to Fill in Data? [closed]

I need help to write a batch file that can do fill the blank. File like this: ~E-00001~|~E-0000001.pdf~|~C:\2014\text\~ ~E-00002~|~~|~~ ~E-00003~|~~|~~ ~E-00004~|~E-0000002.pdf~|~C:\2014\text\02~ ...
0
votes
1answer
51 views

creating a batch file to open a program in a non-default state

Is it possible to create a batch file that would open a program in a non-default state? For example I would like to open firefox and the web console tool located in Tools->Web developer in Firefox ...
0
votes
1answer
99 views

robocopy using parent folder name

I have a small batch file that uses robocopy to backup a folder. The intended action is for it to copy C:/users/public/ into D:/Backups/YYYY-MM-DDTHHMM/ At present, it copies the files into a folder, ...
0
votes
1answer
72 views

Suppressing errors from an embedded command in a batch file for loop

I have a batch file that uses the for command to parse the output from another command, but I want all errors written to STDERR to be suppressed. I have tried this: for /F "usebackq delims=" %%a in ...
0
votes
0answers
366 views

Batch file - Copying folders with percentage

I'm currently trying to create a batch file, which actually copy a folder from a server to a clients machine. And I'm playing around with batch file, using xcopy, and it gives me the percentage of ...
0
votes
2answers
181 views

Printer bat script

I've been having some issues with a batch script that i have setup to add IP printers as local printers. It seems to be working just find on my own computer where i wrote the script but now seem to ...
0
votes
0answers
35 views

Batch file: how to check if Windows 8.1 update is installed [duplicate]

Now that Windows 8.1 Update (a.k.a. KB2919355) is out, and the Windows 8.1 Update is mandatory to get security updates: How can you check if Windows 8.1 Update is installed from within a batch file? ...
0
votes
1answer
41 views

batch rst2html conversion in a bash script

I have multiple .rst files in multiple folders and sub-folders on my Debian system. How can I create a script that converts all the .rst files in html (with the rst2html command) and creates new ...
0
votes
1answer
176 views

How can I batch convert subfolders of images into single PDFs?

I'm surprised I couldn't find an easy script for this online. I have a directory with lots of subdirectories, each filled with TIFFs. How can I batch convert subfolders of multiple images (TIFFs) into ...
0
votes
1answer
438 views

Batch file to search for and delete lines containing specifc text in a csv

I have a bat file that searches a directory for specific .csv files names, and copies and amends the lines into a new .csv file. However, some of the lines of the original .csv files are not ...
0
votes
1answer
62 views

How to access cmd of another computer from my computer's cmd?

How can I access the Command Prompt of another computer from my own computer's Command Prompt in Windows7? I am hoping that I can do something like that into a batch file: Enter \\ComputerA -u John ...
1
vote
2answers
2k views

Batch file, skip a step if an error occurs

I'm trying to write a script that automates copying some files from two external locations using Robocopy. I want the script to skip a step if one of the locations is unavailable. I'm using the ...
0
votes
1answer
66 views

How to split video to 3 parts by ffmpeg?

I want to split video to 3 parts in batch mode. So, I have this code: @echo off for %%i in ("*.mp4") do ffmpeg -i "%%i" -vcodec copy -acodec copy -ss 00:00:00 -t 00:00:05 D:\Ebook\%%~nxi_1.mp4 for ...
1
vote
1answer
216 views

Can't save batch file shortly after running it on Windows 7

I'm working on a batch file in Windows 7 Ultimate. I'm using notepad++ with the runme extension. When I run the batch file and make some changes directly after that, I am not able to save the .bat ...
0
votes
1answer
39 views

Batch scripts to read a list then delete from a directory

I need to have a batch script that reads a file, and from a list in that file deletes items from a directory.
1
vote
3answers
62 views

moving a file based on its extension in BATCH

I am making a batch script to move files based on their extension, so for example: video.avi would go to Videos text.txt would go to text files I am using the drag and drop technique of getting the ...
1
vote
1answer
42 views

What is the significance of a dot after a command in Batch?

When writing Batch files (.bat), ECHO. is used to print a blank line to the screen. How does this work? What is the significance of a . after the command name? From the tests below, it seems that ...
0
votes
0answers
40 views

Extra space when starting application with arguments using batch?

Any idea why there is an extra space before the argument? Thank you. http://s7.postimg.org/ee1fbtye3/extraspace.png @ECHO OFF SET EXEPATH=D:\Games\StarForge\StarForge.exe SET ARGS=-nolog START "" ...
0
votes
1answer
241 views

How do I write a batch script that iterates through all png files in all subfolders and does an action?

I'm looking to build a small batch script that executes the command line of pngout.exe So far I've got only this down for %i in (*.png) do "g:\myfiles\_pngout.exe" "%i" /s0 /c6 However, for that ...
1
vote
1answer
2k views

Install a Teamviewer Host Silently with Custom Password

So our company has the custom Teamviewer hosts that we can run silently with the /S switch. The issue is that we can't connect due to it not setting a password that we know. Does anyone have any ...
0
votes
0answers
225 views

Batch script to get data in an infinite loop and post to a URL

Here is my working script for Unix. It gets data from command line and posts this data to a URL: #!/bin/bash while read line do echo `curl -XGET "http://domain:8080/test/$line"` done I tried ...
1
vote
1answer
50 views

How to pass CLIs in a remote linux server from windows batch script?

I am able to connect to a remote linux server by using start C:\Users\pankmish\Downloads\putty.exe -ssh stag -l username -pw password But Now i am trying to give linux CLIs from same batch ...
1
vote
1answer
301 views

7-zip -xr!*.bat is creating an empty archive with the batch files name

I am trying to exclude files from a 7-zip batch. The syntax is: for %%A in (*) do "C:\Program Files\7-Zip\7z.exe" a -tzip -xr!*.docx "%%A.zip" "%%A" -xr!*.bat The command is creating zip files ...
1
vote
2answers
65 views

Batch File - Know if disk is partitioned or not

I am working on Winpe environment, how to get informations if the disk 0 is partitioned or not to launch specific commands on each case i have tried this, but how to get this works properly in a batch ...
2
votes
1answer
174 views

Batch adjust / increment file date by an offset?

Suppose I have a folder of 100 files, and they have created/modified dates that are wrong, because the real-time-clock in the device that wrote them was wrong. I want to add the same offset to the ...
0
votes
0answers
51 views

Batch Script related issue

I have written following script which works absolutely fine on my system. @echo off setlocal enabledelayedexpansion FOR /F %%i IN ('wmic /node:%1 computersystem get Name') DO SET A=%%i FOR /F %%i ...
1
vote
1answer
33 views

Recursively Rename File Extensions Across Multiple Drives

I have this for a batch file. I know squat about batch files. FOR /r %%x IN (*.BMP,*.GIF,*.JPG,*.PNG) DO REN "%%x" *.jpeg Which works fine locally. I need this to work across multiple drives ...
0
votes
1answer
82 views

I'm trying to run a batch file that test for 4 different files then based on the correct file present it runs the correct command

:: batch file to run backup @echo off setlocal set backup1=="F:\my backups\Disk_1_DataBAckup" set backup2== "F:\My backups\2_backup_data_to_disk2" set backup3=="G:\my backups\3_backup_data_to_disk3" ...
1
vote
4answers
1k views

How to read values in a particular column of a CSV file in Batch?

I am planning to write a batch script wherein I need to scan the values from a particular column of a CSV file one by one and store them in a variable for further processing. Say, following is the ...
0
votes
0answers
34 views

Can you help me make this mass un-archeiver batch better

This batch works fine so far, I feel I have come far being that I have only been doing this as a self learning project for a few days with no experience. I am asking if you guys can offer me any ...
0
votes
1answer
66 views

Windows 8 located all drives and run command on each

This is what I have so far @echo off for /f "tokens=2 delims==" %%d in ('wmic logicaldisk where "drivetype=3" get name format:value') do echo %%d output is correct @echo off FORFILES /P C:\ /S /M ...
1
vote
1answer
107 views

Dir and Findstr commands taking a long time to complete in Batch File

dir %DRIVE_NAME%: /S /C /A-D /Q /T:C | findstr ".zip$ .doc$ .xls$ .xpt$ .cpt$ .cpo$ .xlsx$ .pdf$ .dat$ .txt$ .docx$ .csv$" >> file.info I am using above command to list all information in ...
0
votes
2answers
143 views

Creating Comma Separated Values in Batch Scripting

I have written a piece of code in Batch script which is somewhat like : ( wmic.exe /node:x.x.x.x computersystem get name wmic.exe /node:x.x.x.x computersystem get domain wmic.exe ...
0
votes
1answer
1k views

How to open multiple tabs in IE8 from batch file?

Upon searching for an answer to this question, I stumbled upon an almost identical question on this site, to which someone answered: "For launching multiple URLs in tabs in a single IE window, use the ...
0
votes
0answers
46 views

Wordpress permissions Batch file

I'm trying to setup permissions for Wordpress on IIS 7.5 running in Win7. I created a Batch file to apply permissions. Can anyone let me know if something is wrong, Or needs adding to? Begging of ...