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

2
votes
1answer
105 views

How to bulk delete all disconnected devices from Windows 7?

There are many entries in the "Devices and Printers" window showing devices which are no longer connected. How can I delete these entries all at once, ideally on the command line? This picture ...
0
votes
0answers
14 views

Moving line with regex notepad ++ [duplicate]

I want to move line down to up with regex notepad ++ or batch script windows example : Video.asp?ZoneID=791 Video.asp?ZoneID=792 Video.asp?ZoneID=793 Video.asp?ZoneID=794 Video.asp?ZoneID=795 ...
3
votes
3answers
305 views

Script to get images in folder with dimensions printed to a .txt file

As title goes, is there a script for Win 7 to get printed on a .txt file all the images (JPG, PNG, GIF ecc) inside a folder along with "filename" and "pixels dimension"? I've tried with dir on ...
2
votes
2answers
42 views

How to compress multiple files with similar names?

So I've got some 20 000 files that I want to compress and group by following logic: compress every file that have identical characters up to ( also include files that have no ( So the files are ...
2
votes
1answer
24 views

If then statement in the for loop

I'm nebiew for windows scripting. My scripts would seachs string in the file, if counted the string and checking return code in if then else statment. But, I have question, some error on if then ...
1
vote
1answer
34 views

Is there a tool similar to IEpxress or 7Zip that can pass command line arguments to a dependency [closed]

I recently discovered IExpress and would like to use it to package arbitrary scripts in any language with their respective interpreters/libraries/dependencies. IExpress and 7zip can offer all of that ...
0
votes
0answers
49 views

Unzip .gz file in windows batch script using 7zip

I have 7 zip installed on windows machine. I have to extract .gz files into .txt files. I am not able to find a suitable command to do that. I tried below : 7za e ...
0
votes
1answer
41 views

batch file opens new command prompt - how to redirect new command prompt to a file?

tia, but I'm wondering if there's a way to redirect a tomcat startup.bat call into a text file. Here's my situation: I open cmd, navigate to the needed directory, and call 'startup.bat' This opens up ...
0
votes
1answer
39 views

Batch rename folders with illegal characters * and :

I want to move thousands of folders and files from an old to a new storage system with Windows 2008 R2. Obviously a user with MAC OS has named hundreds of folders with characters - * and : - that ...
-1
votes
2answers
42 views

How to extract a string from last line in a text file -windows batch script

I have a .txt file in this format 123|abc|23456 234|rsty|68589 890|gfyu|5679 TRAILER|3| How do i extract "3" from the last line enclosed between "TRAILER|" and "3" ? Need help.
0
votes
1answer
37 views

Win 7 - Batch issue, it doesn't like spaces in folder names

You'll have to forgive me (or not) my knowledge of batch programming is fairly rudimentary. I have created a couple of batch files to help launch a game, change a system variable (to move saved games ...
0
votes
1answer
29 views

Windows batch file “was unexpected this time”.

@echo off pause set /a x=1 set /a n=0 set /p x_end=x (End)= :loop cls set /a n=n+1 set /a x=x+n+1 set /a students=n+2 echo x=%x%, n=%n%, x (End)=%x_end% if (%x%=%x_end% goto end) goto loop :end echo ...
1
vote
1answer
45 views

7zip Batch Compression for a specific file extension in different folders

I've already learn how to batch compress my files as-is with 7zip but I have something more complex need on this issue. Maybe I can explain my needs with this scenario; I have a backup folder of my ...
2
votes
1answer
25 views

Delete scheduled taskname containing space

I want to delete scheduled tasks that start with "Adobe Acrobat" eg "Adobe Acrobat 123","Adobe Acrobat 456","Adobe Acrobat 789" schtasks /Delete /TN Adobe* /F This command fails to find any tasks ...
0
votes
3answers
46 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 ...
0
votes
2answers
43 views

Batch: How to forward data to new CMD instance as arguments

I'm looking to call another CMD instance and pass data to it from the parent instance. I'm aware of the general route of using variables, but it would not be feasible in this case as endlocal and ...
2
votes
2answers
40 views

Batch: avoiding specific conflict in FOR loops

Problem: unexpected behavior (single duplicate) in FOR-loop. I'm trying to make a simple batch-vbscript interface for mounting and dismounting volumes, among other tasks ("Voltask"). A central part ...
0
votes
1answer
41 views

Rename txt files based on the file's content (OSX)

I have about 250 txt files that are all named link.txt and they have this information always on the line/row 3: title: Some kind of title I need some kind of script that can go through these ...
-1
votes
1answer
31 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 ...
1
vote
2answers
57 views

Stop/start a Windows service with a specific path?

I would like to create some scripts (Windows Batch or PowerShell, whichever will work) that can stop and start services that have their binPath in a specific folder. It will speed things up when ...
0
votes
2answers
37 views

Windows Batch File Rename Multiple Periods

I am simply basically trying to copy a file such as X.TWO.THREE to DATE.X.TWO.THREE. X is a constant while the date will be added in the future. For now I was using a constant for that as well. When ...
-3
votes
3answers
43 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 ...
0
votes
2answers
80 views

.bat file random open file for 1-5 file in folder

I need a script to run in a window to monitor my folder. When I put a jpg file in this folder, then the script running in the window should open that jpg file with photoshop droplet (.exe), wait for ...
1
vote
1answer
62 views

Error when trying to copy over the network using robocopy

C:\Users\Alex.Newton>robocopy /"\centlpf01cz6c\c$\Program Files\ProgramName\/" /" \centlpf01cz6c\Program Files\TestBatch\Test\/" ...
0
votes
1answer
61 views

Windows 7 startup batch file hidden [duplicate]

I followed a guide to create a batch file so I can delay a program from starting up for a few seconds. (I didn't want to use a 3rd party tool) The thing is I don't want to see that cmd window for X ...
-2
votes
1answer
53 views

Batch/Powershell - Empty directory - mkdir with todays date - backup folders

I'm trying to make a batch or a powershell script that: First: Empties the folder C:\backup\ Second: Creates a new folder with todays date withinin c:\backup\ Third: Copies 2 folders c:\123 and ...
1
vote
1answer
102 views

How would I add a RunOnce reg key on a remote machine to have a browser open a webpage

Context / Background / Info: I have local admin access (not domain admin) in a few computer labs that I manage and maintain. I have a script that I use (below) that will reboot computers and log in ...
0
votes
1answer
59 views

Remove substring from absolute path windows script

I am new to windows scripts and I have the absolute path like- /bin/debug/test/abc.xyz.dll and I want to remove the file name and get only path like output: /bin/debug/test/. How should I do that?
0
votes
2answers
28 views

How to extract second word of the string via windows batch

I would like to request an assist for this case. I want to get the second word of title so that I could set it as target file. set title=THE PROGRAM TITLE HERE
2
votes
3answers
107 views

Make batch file wait for service to start when restarting services

I have a batch file that frequently restarts a group of services developed in house. We are soon moving away from these to something more stable, but for the time being the services need to be ...
-1
votes
1answer
52 views

Batch- file to move all files from one location to another in windows?

what I'm after is a batch file that will move all files from one folder to another, with the view eto schedule this as a task to run twice daily. I know the whole move command etc but appears to be ...
0
votes
0answers
17 views

How can I batch convert all of my video files to AAC audio without converting the video?

I've used XMedia Recode to do this and it works great. I set video to "copy", audio to "convert", and it takes 2 minutes for a 2GB file. There's two problems with it for batch work though. It doesn't ...
1
vote
2answers
33 views

Error calling .vbs from .bat

I am currently trying to call a .vbs file from a batch file and it keeps giving me an error. This is my batch file: @ECHO ON cscript "C:\Users\Alex.Newton\Desktop\VBScripts\First scripts\This is my ...
-3
votes
1answer
51 views

“The syntax of the command is incorrect.”

I've developed a new feature for my Batch game which gives the user the ability to define the name of their own save file along with the loading system and the new saving system is working properly as ...
0
votes
1answer
91 views

How to run batch file command line argument on another server?

I have Encrypt.bat on \\RDWAPPserver which contains code to encrypt the file and upload it to FTP server by using 2 commandline parameters. Encrypt.bat needs 2 commandline parameters exl: ...
2
votes
1answer
59 views

How would I query, then toggle Windows updates off and on via a batch file?

Please take it easy on me if I speak out of place is this is my first post. :-) but I've been looking for a way to query the Windows Update service through a batch file and based on its current state, ...
-2
votes
2answers
39 views

Destination and Start in on a batch

On a normal windows shortcut we have the Destination field and the Start in field. Can I do those on a batch ? . Complicators: Windows is on C: The application is on E: The Start in folder is on ...
0
votes
1answer
76 views

How to show a comfirmation dialog when a batch file window is closed

When users click the close (X) button of a batch file window, I want it to show a confirmation dialog asking "Are you sure want to close this batch file?" with Yes/No options. How can I do this?
0
votes
0answers
39 views

VLC Batch file playback

I'd like to be able to run a batch file from my computer that does the following: Open VLC Play a video file until it said file ends. Stream webcam (dshow://) whilst playing a sound file only after ...
0
votes
1answer
13 views

Need command to edit a service's log on to Local System Account

When you right click a service in services.msc and go to properties and Log On, it lets you change it to Local System account, how can I switch to that setting with a batch command, I want to switch ...
0
votes
2answers
140 views

I can't run .bat and .cmd files with start command (Windows 7)

I can run .bat and .cmd files typing his names in windows console, but if I run with start "" file.bat I get this error: System can't run specified program. I have tested with a very simple file ...
1
vote
1answer
250 views

How to upload file in FTP server using batch script?

I have created batch file called FTP_automation.bat which contains code below SET MyPath=E\PGP\test_pg ftp open 142.245.30.165 21 TESTA9MS test11 binary put %MyPath% quit Pause The thing is when I ...
0
votes
1answer
43 views

mailto command line not able to set additional parameters

I am trying to create a simple batch file to send an email. I am following steps found online and came up with a simple example like this: START ...
0
votes
0answers
44 views

Ampersand & special character on a Active Directory Name and CMD commands

I have a group that part of its name contains an ampersand & I am trying different commands for example dsquery group -name A&I-group but it does not work I tried escaping it using the ...
2
votes
1answer
29 views

Batch File XCOPY Invalid number of parameters

I'm trying to create a backup batch file, it's been a number of years since I last did one and I'm having a bit of trouble. I am creating a folder in one location with the date and time in the folder ...
-1
votes
4answers
90 views

How do I make a registry entry with command prompt?

How can I make command prompt (batch) add this entry to the registry? To set the value of the LocalAccountTokenFilterPolicy registry entry Open the registry key: ...
1
vote
2answers
100 views

Copy all files from a list of folder locations

I have a list of folder locations from which I would like to copy all the contained files at these locations. The list of folder locations are stored on a seperate line within a text file (.txt). All ...
2
votes
1answer
52 views

How to pass parameters in batch file and zip the file using 7z.exe?

I need to create a batch file as per below requirements 1) pass path1 & path2 while running the batch file exl: testrun.bat E:\ERP\test1.txt E:\ERP\header.txt 2) Need to store these command ...
0
votes
0answers
80 views

Set Windows 7 to “Performance optimized” under Visual Effects with Batch script

I have this .bat script to start a specific game: @echo off if not "%~1"=="p" start /min cmd.exe /c %0 p&exit start "" "GTAVLauncher.exe" timeout /t 60 /nobreak >nul taskkill /f /im ...
0
votes
1answer
41 views

set telnet to use NTLM with command

To set telnet to use NTLM authentication you type in telnet and press enter then type set NTLM How can I make it do this with a command. using telnet set ntlm for example does not work.