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
0answers
17 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
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 ...
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 ...
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 ( ...
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
1answer
18 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
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 ...
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 ...
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 ...
0
votes
1answer
37 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 ...
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
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 ...
1
vote
2answers
48 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
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.
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
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 ...
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
0answers
36 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 ...
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 ...
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
29 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
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 ...
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
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
17 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 ...
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 ...
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 ...
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 ...
1
vote
0answers
23 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 ...
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 ...
0
votes
0answers
86 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: ...
2
votes
1answer
24 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
25 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
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
32 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
1answer
39 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
2answers
90 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
40 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
34 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 ...
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
1answer
38 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
34 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 ...
0
votes
1answer
20 views

“^” symbol not working properly on my batch file

So I've created a batch file, but every time I get the error "Unbalanced Parenthesis." @echo off :top cls echo. echo ========================= echo + -=-=-=-=-=-=-=-=-=-=- + echo ...
0
votes
1answer
46 views

how to completely disable pagefile use wmic

Hi I am trying to create a batch file to disable the page file on windows 7, is there any wmic command will do this? I know I should be able to use "wmic pagefileset delete" however this always ...