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
2answers
16 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 PGPProcessPath=\\%~p1 SET EncryptFile=%PGPProcessPath%%FileName% SET ...
0
votes
1answer
32 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
38 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
31 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
26 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
35 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
30 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
35 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
63 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
19 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\/" ...
-1
votes
0answers
16 views

Batch file to copy files from sub folders and not the root folder [closed]

I have a folder like "source_path" which contains files & sub folders. What I want is that I wish to copy particular files (which are older than 90 days) from only particular subfolders (not all ...
-2
votes
0answers
11 views

How to automate conversion of dozens of JPG files to PDF [duplicate]

I need to convert dozens of JPG files into a single PDF file and then publish it on the website. I normally use Universal Document Converter. I open the folder with JPG files, select them all, send to ...
0
votes
1answer
43 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
41 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
29 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
42 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
25 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
41 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
33 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
13 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 ...
-2
votes
1answer
23 views

Batch: Cannot read a specific variable [closed]

It's me, again. The team suggested we develop a new loading system which automatically detects the type of the save file instead of the user having to select what the type of the save file is. ...
1
vote
2answers
24 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
41 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
38 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
45 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
33 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
56 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
20 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
12 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
70 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
67 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
16 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
27 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
24 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
66 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
85 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
36 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
53 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
30 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.
0
votes
0answers
20 views

Term service will not start

I just reinstalled Windows 7 professional and the first and only thing I did was run these in the command prompt to enable remote desktop: reg add ...
0
votes
1answer
51 views

TOUCH a batch file from itself

I'd like a batch file to touch itself to an arbitrary date/time. I've tried... touch.exe -xamq -t 201010201020 -- batch.cmd start /b "" cmd.exe /c "touch.exe -xamq -t 201010201020 -- batch.cmd" ...
1
vote
1answer
56 views

ffmpeg | batch convert | make same filename

How would I use ffmpeg to create a batch convert file for sample rate conversion, such as: $ ffmpeg -i *.wav -ar 22050 *.wav Take note, that i'm only doing a sample rate conversion, but in the end ...
-1
votes
3answers
57 views

Commands not executed with %comspec% /k

I am trying to execute a .bat file with a set of commands which can be executed individually through the command line, but not all together through the script: %comspec% /k ""C:\Program ...
0
votes
3answers
43 views

Use batch to make duplicate files based on one extension

How can I make copies of some files with a specific extension (but changing the extension) just based on their extension? I've tried just showing those files but get nothing: @echo off for %%f in ...
0
votes
1answer
32 views

Getting GUID from Mountvol in Batch file

This is sort of silly, but today is the first day I'm using batch scripts, so bear with me. I'm using the following code to find a particular drive letter assigned to a volume. set ...
0
votes
0answers
17 views

netsh wlan will not show computers on network

I am using the following command to create a WiFi Hotspot: netsh wlan set hostednetwork mode=allow ssid=SSID_NAME key=PASSWORD netsh wlan start hostednetwork pause There is just one problem though, ...
0
votes
2answers
36 views

How to write to a batch file to tell it to write to another batch file

How to write to a batch file a command which itself writes to another file. Basically what I'm trying to achieve is this File1.bat echo abc >> op.txt File2.bat echo abc >> op.txt ...
0
votes
0answers
21 views

Robocopy won't work with Task Sheduler in Win7

I need to copy file from server to local disk cca every 5 minutes. Created batch file work fine but from Task scheduler it does nothing. The Batch file looks like this: ...
0
votes
2answers
68 views

%%f in a batch file with Windows 7 Professional 64 bit

I have a line like the following in a several batch files: FOR %%f IN (%*) DO something.exe %%f I've used them for a long time with no problem. I recently had to replace my hard drive and had ...
0
votes
0answers
29 views

Running Batch files when a Pop up message appears from another app

I need to run a batch file when ever a particular Pop up message occurs. Basically I have a batch files, but I cannot directly call it from my application. but I can create a Pop up message from my ...