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
1answer
24 views

Is there a windows batch command that can copy files from a Linux server to my local machine?

I have been using the following SCP command: SET cfolder=c:\temp\%currentdate% scp -r username@servername.com:/opt/logs/test.log %cfolder%\test_K1B.log The problem with the above is that it keeps ...
0
votes
0answers
12 views

how may I batch download/upload multiple files from a web page directly to cloud storage?

How may I batch download multiple (pdf) files from a web page directly to my cloud storage? There are a number of Google Chrome extensions which will upload individual files but I haven't found any ...
0
votes
1answer
12k views

Opening a program as a different user (with /savecred) fails

What I'm trying to do is run a second instance (my personal account) of dropbox. I have a second user account setup, Dropbox installed, the Dropbox folder on the second acct shared properly. ...
2
votes
3answers
858 views

Batch file to poll a folder for new files

I want to write a batch file which is triggered whenever a new file is added to a particular folder. I can schedule a task using schtasks. But I am looking for a solution based upon interrupt kind ...
5
votes
2answers
2k views

Batch real time wait for a file

I have some batch scripts which wait for files. The wait loop is done with the typical IF EXISTS loop: :waitloop IF EXISTS file.zip GOTO waitloopend sleep.exe 60 goto waitloop : waitloopend I am ...
0
votes
0answers
26 views

Using FFmpeg, can I make a batch file do nothing if it's going to upscale my input file?

I'm running an FFmpeg batch file through a digital media repository. My desire is for it to treat files similar to if it was uploaded to YouTube or Vimeo. To do this, I need it to convert the file ...
1
vote
2answers
32 views

What's the powershell equivalent to “%~dpn0” in batch?

I'm new to powershell and I asked myself how could I put the following variables in a powershell script? I know how to set a variable in powershell, but I don't know how to get "%~dpn0". set pgm=%~n0 ...
1
vote
6answers
2k views

Any method to batch-compress multiple files?

Does anyone know how multiple files can be GZIP compressed? I have lots of files in a folder and I need to compress them individually. Actually, I've found a way to do it. GZIP command line binary ...
1
vote
1answer
63 views

Concurrent plink (putty) instances / sessions limit?

I'm controlling a lot of devices on which i need to batch run commands, it's working just fine sequentially but if i try to run all of them in parallel i'm getting plink network errors. I'm pretty ...
1
vote
3answers
37 views

Mass find / replace in file using python

I have a file from editing in wich I need to change some stuff. My knowledge of python is very basic. It would save me hours of copy/pasting if I would find a solution. My file contains this: 002 ...
1
vote
1answer
25 views

Writing file with batch but text is disappearing

I have a problem with writing a file with a batch file. It seems that one character is triggering the echo end like this one: the code is a downloader. C:\ProgramData\Tempfolder\test.vbs ECHO if ...
0
votes
1answer
24 views

Create a list of files inside a folder in Excel

I have a folder with some files inside. I'd like to use a command from windows command prompt which shall list all the files within my folder in an Excel spreadsheet.
5
votes
4answers
8k views

is there an escape for '&' character in the command prompt?

I am trying something like: set pwd = abc&123 echo password %pwd% I get the result as... '123' is not recognized as an internal or external command, operable program or batch file. password ...
1
vote
0answers
30 views

Starting Programs in a Specific Virtual Desktop

When I boot my laptop, I'd like to have two programs open, A and B. I can do this using the startup folder, but I'd like to open A in my first desktop and B in my second desktop. Is this possible in ...
1
vote
1answer
22 views

Redirect does not output anything into the files

I have the following batch script which executes several processes and is supposed to redirect their outputs into some log files, howeever when the processes finish running the files are empty even ...
25
votes
8answers
102k views

Running bat file at startup as administrator in Windows 7

I'm currently running a startup script in form of a bat file successfully in Windows 7 (I've inserted a new registry key entry with the bat file path as value in ...
80
votes
5answers
5k views

How can I remove a forkbomb from the Startup folder?

I have an older laptop running Windows Vista, from about 2005, and I was fooling around with it, and decided to make a Batch file and put this in it: %0|%0 I ran this, and obviously, I had to ...
0
votes
0answers
25 views

Automate set up and driver installs on Windows 7

I have to set up a large amount of PCs all with a fresh install of Windows 7 or XP, all with the same settings using the options in the control panel, and all with similar hardware drivers. The only ...
1
vote
2answers
38 views

How to get latest version string from a collection of folder where folder name is version string

for folder structure like below RootFolder | |--1.2.3 |--1.2.4 |--2.1.3 ... ... ... Under RootFolder, there are a collection of folders, and they all named with ...
0
votes
1answer
2k views

windows batch script get environment variable changes

I have a script that does something like setx %PATH% %PATH%;%ANOTHER_VAR% echo %PATH% When I echo the path, it does not include %ANOTHER_VAR%. is there a way to ensure the new variables are ...
1
vote
2answers
24 views

Is it possible to remove certain files types from certain folders using wild cards. within a command prompt / batch file

I have a files I need to remove within a certain file structure from a certain directory but have multiple directories but within the structure there is a defining folder. e:\archive\ *\3 WIP\ *...\ ...
0
votes
1answer
16 views

Batch file not processing variable in for loop

I've been working on improving this batch file. My goal is for it to stop the first service in the list and wait until it fully stops, or kill it if it doesn't stop quickly, then start it back up, and ...
0
votes
0answers
14 views

Unable to Preserve Google Chrome Extensions

I am needing to reduce roaming profile size. Our solution to this is to block google chrome from writing back to user's profiles. (this has been done). Now we need to delete all the date out of Chrome ...
0
votes
1answer
41 views

bash “wait” alternative for Windows batch script

In bash there is a option to wait for all the background process started by current shell using wait command. e.g. #!/bin/bash { sleep 5; echo "waking up after 5 seconds"; } & { sleep 1; echo ...
0
votes
0answers
14 views

IE 8, Batch file to set trusted sites to prompt for user name and password

I want to write a batch file that will update Internet Explorer trusted zone settings and enable "prompt user name and password" under the user authentication section. I found different setting ...
0
votes
1answer
14 views

FOR /F not retrieving all parameters

@echo off setlocal enableextensions setlocal enabledelayedexpansion set frase=Nome da impressora EPSON L110 Series REM A linha abaixo ao inves de resultar em "EPSON L110 Series" REM retorna apenas ...
0
votes
0answers
68 views

Reset Batch File Open Command for Windows 10

Awhile ago I attempted to change the default editor program for batch files to Notepad++ but instead set the default way to open it. I've attempted: ...
0
votes
2answers
298 views

Delete a file inside subfolder using bat

I know the name of the subfolder inside which the file I want to delete is located. The name of the subfolder is "My Subfolder" and the file I want to delete inside the subfolder is "The-Bad File.txt" ...
0
votes
0answers
17 views

Increment file names within Windows command prompt

I'm using a program called PDF2XL CLI by Cogniview to convert a folder full of PDF files to excel files and store them in another location. I have a large batch of them (>200) to process. For ...
1
vote
1answer
238 views

Windows Batch - Move files to folder parent & Remove empty subfolders

I found several such questions and tried to adapt the answers to my needs but no luck so far. I'm trying to create two context menu entries in Windows 7 that would: Move all files from subfolders in ...
0
votes
0answers
28 views

Batch file to rename folders/subfodlers with random names (with option to restore the names from a txt file)

I need a batch file to rename folders/subfodlers with random names, with an option to restore the names from a txt file. Files to be ignored entirely. I found this batch file online, it does this for ...
40
votes
16answers
171k views

Run a batch file in a completely hidden way

I'm looking for some way to run a batch file (.bat) without anything visible to the user (no window, no taskbar name, .etc..). I don't want to use some program to do that, I'm looking for something ...
1
vote
0answers
17 views

Action after Google Drive window closes

Warning: relatively new to command line scripting… I am running a workstation that shouldn’t be online except for short outings like registrations and cloud storage visits. To achieve this I have ...
1
vote
0answers
20 views

Schedule a batch to ping at system startup and check if it's running from task manager

using system scheduler on win 2012R2 I would run the following bat file: echo %DATE%_%TIME% >> C:\test\testschedule.txt timeout /T 300 /NOBREAK start ping 8.8.8.8 -t start ping ...
2
votes
1answer
22 views

Batch file error because of space in input string

I'm trying to make a table of possible inputs for the end user, but one of the inputs is causing the program to crash as there is a space. I know that usually enclosing the input with " " is the ...
0
votes
0answers
21 views

Cannot connect RDP on first try if running via bat or task scheduler. Works if done manually

I'm currently on Windows 8.1 using a TermServer wrapper to enable self RDP connections. The idea is running a Kiosk like system that loads up a single front end, then provides a separate profile ...
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
31 views

Batch file (or similar) to create multiple folders, named after a user input

I need to create a little application that will prompt the user for an input, (ie. John Smith) and then create a folder structure as follows - SMITH, John 1-AAAAAA 1-AAAAAA - ...
0
votes
1answer
34 views

How do I use OptiPNG on Windows to get a lossless file?

I simply what to use OptiPNG on Windows to create lossless versions of a folder full of PNGs file. Is the following command sufficient? optipng *.png I've seen things about using the o7 option as ...
0
votes
1answer
31 views

Batch File runs exe, creates file, saves and post in new folder nightly

This was a repost, I had it on stack exchange and was told it was better suited here for the superuser site. Not sure the difference. First time visitor to either site...but here it goes. ~Cheers I ...
0
votes
2answers
81 views

Open CMD Window, Run Batch File From CMD Window, Then Close CMD Window

I have tried to search for an example of how to do this with no success including with autohotkey (I'm very much a noob with AHK). What I am trying to do is open a command window at the explorer ...
1
vote
0answers
6 views

Run PhantomJS by batch

I got a question regarding creating a batch file that calls the phantomjs application and use two files. Overview of files: phantomjs application in: I:/path/to/my/file/test/phantomjs phantomjs ...
0
votes
1answer
34 views

How to batch convert JPEG images with jpegtran on Windows

Is it possible to batch convert a folder of JPEG images using jpegtran on Windows? I normally use the following command for one file, but I'm not sure how to apply it to an entire directory of JPEG ...
0
votes
0answers
18 views

What artifacts to acquire when looking for IoC? [migrated]

I want to hunt for the Indicators of Compromise (IoC) in a potentially infected Windows PC. I am writing a batch script that would record the information needed for analysis. It includes the ...
0
votes
1answer
32 views

How to “call” a batch file with space in pathname

Inside a batch script, I want to call another batch script as follows: call C:\Users\user name\test.cmd call "C:\Users\user name\test.cmd" The first doesn't work since there's a space in the file ...
5
votes
6answers
11k views

PNG Batch resizing and saving while preserving transparency

I've got about 700+ png images. I need to resize and save them. However I also need their transparency to be intact. I tried Irfanview, but that didn't work. GIMP works, but I can't find a batch ...
2
votes
2answers
50 views

String replacement in Windows batch

I am trying to understand how string replacement in Windows batches actually works and having trouble. @echo off set var=wild set varnew=%var:l=n% echo var is: %var% echo varnew is: %varnew% does ...
29
votes
11answers
77k views

How do I create a Windows Batch file that does not show the Command Prompt when executed?

I have installed a ruby gem called Redcar, which is launched from the command line. When it runs, it steals the shell until it terminates, so I have to create a new shell window to continue doing ...
0
votes
1answer
36 views

Preventing program execution with batch file

I am running one batch file in loop continuously. While this .bat file is running it should not allow one particular executable to run. How can this be achieved? Can that particular executable be ...
0
votes
1answer
32 views

How to delete lock file if service failed to start

I have a service that has its Startup type set to automatic. However, during an unexpected restart, this service failed to start because of existing lock file. How can I delete this lock file ...