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
17 views

Windows batch script to replace a word in a filename

I've got a user that creates multiple exported sets of textures from a visual editing program he uses daily. When these export the filenames come out with a pattern of "texture*" (e.g. texture_43522, ...
1
vote
0answers
16 views

Return 'dir' command results into array/list

I want to know how to return the output of the dir command into an array. I'm using the command like this: dir /s /b *.txt how would I put each result (file name) into an array/list. Thanks
1
vote
3answers
7k views

How to control power to USB ports using batch

How can I toggle the power to a USB port on/off using batch or the command line? I am using Windows 8 to do this. Does anyone know what I could do? I have 4 USB ports.
2
votes
1answer
22 views

How to load files according to Created Date in Windows command prompt

In SQL Server using xp_cmdshell, I was able to load files according to Modified date using a command for e.g., z: & forfiles /m *.jpg /s /d 07/16/2015 /c “cmd /c echo @fdate @ftime @path” But I ...
0
votes
1answer
28 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
1answer
38 views

Batch Create folders based on file names excluding parenthesis and brackets

I have thousands of files with the following structure: Sample1 (43643) [3235] Sample1 (32352) [6432] Sample1 (35346) [4364] I am trying to batch create folders based on the file name excluding the ...
0
votes
0answers
13 views

start specific firefox profile with batch and open url

I have the code to open firefox profile. I am using shortcut on Desktop named profileA. start "" /B "C:\Users\UserA\Desktop\profileA" But when I try to open a link via FireFox addon inside it I ...
1
vote
2answers
23 views

Get batch argument by with a variable containing a number

I have a loop that enumerates all arguments. From this loop I want to loop thought all up until the current argument. @ECHO OFF setlocal enabledelayedexpansion SET /a Counter=0 FOR %%a IN (%*) DO ( ...
-1
votes
1answer
3k views

Batch file to obtain system info of remote servers list with unique login credentials

I'm not familiar with scripting. I have a task at hand which requires to check server uptimes to make sure if they were actually re-booted when they suppose to. I was going through Google Search and ...
2
votes
2answers
142 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 ...
-1
votes
0answers
13 views

Finding and renaming folders

I need to make the movement of files to production easier. I want to create a bat file which searches for a particular folder in the drive, say webEF, and renames it as webEF-currentdate and then ...
-2
votes
0answers
19 views

How to move files and folders via DOS command [duplicate]

Can anyone suggest how can I achieve the task below, via DOS command or Windows batch file? I want to move all files and folders from source folder to destination folder. e.g. C:\source\file1.txt ...
0
votes
1answer
4 views

Using a dos batch file, I want to save each Record Name and A (Host) Record from ipconfig /displaydns to a text file

Using a dos batch file, in windows XP, I want to save each Record Name and A (Host) Record from ipconfig /displaydns to a text file. Instead of www.netword.com ...
0
votes
2answers
33 views

Change windows settings via code

I there any way I can use C++ or batch programming to change settings in a windows computer for example enable/disable Services? Or is there a different programming language for that? Which one is ...
1
vote
1answer
15 views

How to run a remote bat file on a local computer

I need to run a batch file, that is stored on a server, locally on a windows 8.1 machine. I can run a shell script in OS X with a curl: cURL "file path" | sh is it possible to cURL in powershell in ...
1
vote
4answers
4k views

How to open multiple URLs in Chrome/Firefox and then save them individually?

If I have a .txt file containing a list of URLs, how can I get Chrome or Firefox to open them, one URL per tab and then save the page in each tab separately? Any platform will do: Windows, Mac, ...
0
votes
1answer
35 views

Is there a way to write a Batch-file which will Return services into their Default mode?

I had already twice a problem with my computer were it just went out of controll and most of the functions were incontrolable, including services like Sound, Brightness, Internet and some other. Later ...
2
votes
3answers
3k views

Add folder name to beginning of filename

I have a directory structure as below: Folder > SubFolder1 > FileName1.abc > Filename2.abc > ............. > SubFolder2 > FileName11.abc > Filename12.abc ...
0
votes
1answer
25 views

CMD Batch file virtually press the enter key

I am working in a manufacturing company. We manufacture PCB for HDD. Each PCB need to be loaded with firmware in manufacturing process. I would open the application the i would browse for the suitable ...
1
vote
1answer
3k views

Run an ftp batch file from within a batch file

I have a scheduled task which executes the commands in my file ftp.txt every day. The file can be seen below, it connects via ftp to my site and puts 3 XML files on to my web server. command: ftp ...
1
vote
1answer
26 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
17 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
864 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
30 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
47 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 ...
2
votes
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
65 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
39 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
30 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
28 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
35 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
26 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 ...
81
votes
5answers
6k 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
25 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
0answers
16 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
44 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
16 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
15 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
84 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
304 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" ...
1
vote
1answer
245 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
33 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
172k 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 ...