Skip to main content

Questions tagged [batch]

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. Please use the tag [batch-file] for that.

1 vote
1 answer
61 views

Any way to do a Batch file move operation only when the HDD is idle-ish?

I know how to check if a specific program is running like winrar which might indicate usage on drive d: but is there a better way to determine if a drive is relatively idle enough (via Batch or other ...
Bricktop's user avatar
  • 313
0 votes
1 answer
226 views

batch findstr not working with string saved in a variable

I'm trying to find a string inside a file.txt using findstr and I have the following issue: set "log_file=C:\Tools_Dev\log_file.txt" a-findstr C/:"text to find" %log_file% works ...
Fernando Lisa's user avatar
-1 votes
1 answer
34 views

how to store a variable and reuse it later within the terminal?

In a normal cisco switch if I run the following command: copy running-config tftp: the switch will ask me for a IP address. for my plink I have this: plink -ssh userhere@IP -t copy running-config ...
user3520554's user avatar
1 vote
1 answer
810 views

Batch files run through Task Scheduler aren't working as intended

This is the code I am using. It is something I found on other posts on this site. Script Code #1: @ECHO OFF SET EXEName=TcpSnd.exe SET EXEFullPath=D:\ComputerRX\Pharmacy\TcpSnd.exe SET ...
RPhZach's user avatar
  • 11
0 votes
1 answer
299 views

What secure erase in the fastest way on Windows 10 with cmd? [duplicate]

I have a program in QT, C++ and I want to secure erase the computer after a trigger. After this process, I do not want the old data on the SSD to be accessed by data recovery programs. I want this ...
mrhndsm's user avatar
-2 votes
1 answer
71 views

How can I improve my Windows Batch File that merges two PDFs into a separate folder to move the PDF regardless of whether a merge exists

I have a windows batch file that merges PDFs from two separate folders and dumps them into a 3rd folder. One of the PDFs is a PDF of a map survey and the other are any accompanying photos the surveyor ...
George Bunkall's user avatar
0 votes
3 answers
248 views

What's wrong with this batch code?

Can someone help how to find whats wrong with this code? Basically its only a part of the script i made to fix somethings and i can get the result of "DCHP Status" gives a blank result or ...
Rootz's user avatar
  • 15
1 vote
1 answer
100 views

Batch file to output MD5 hash to a text file starting at a specific directory

@echo off set "src_dir=C:\Users\\Documents\projects\Config\ABC" set OUTFILE="C:\Users\Documents\Scriptoutput.txt" echo %OUTFILE% pushd %cd% cd %src_dir% for /r %%f in (*) do ( ...
Sam sh's user avatar
  • 21
1 vote
0 answers
81 views

Bat file move files

I need to create a bat file to move files from folder 1 to folder 2. however, I need to keep in folder 1 the files created in the lasts 3 hours. all the rest old files must be move to folder 2. I´ve ...
Matias Squartini's user avatar
1 vote
2 answers
72 views

How to wait until a Batch file operation has completed before redirecting its entire output to a text file?

It is easy enough to redirect output to a text file with a >. For example: for /l %%n in (1,1,10000) do (echo %%n>>output.txt) Ot alternatively: for /l %%n in (1,1,10000) do (call:sub %%n) ...
TechHorse's user avatar
  • 347
0 votes
1 answer
87 views

Double SSH then execute NC using Batch file and Plink

Good morning, I need to execute a netcat command and get the output to do elaboration on my local PC (windows). I just need the "connection good/bad" Now I use PuTTY using the following step ...
ThEnGi's user avatar
  • 1
0 votes
0 answers
56 views

ffmpeg batch doesnt work all of a sudden

I have a batch script that has always worked, but after I formated and installed Windows 11 it doesnt work anymore, tried it on another Windows 10 machine, doesnt work there either so I must be ...
fomt's user avatar
  • 3
7 votes
3 answers
4k views

How can I skip a cycle in a FOR loop?

I am running a Batch script for processing some files. When it determines that the current file needs no processing I would like to skip the rest of the commands for that file and move directly to the ...
Bricktop's user avatar
  • 313
-2 votes
1 answer
115 views

Batch script to re-size JPEGs in music folder to 350x350 and delete unwanted files

I currently use a script to rename music folders from eg. Taylor Swift - 1989 to a new folder Taylor Swift with a subfolder 1989 with all files moved into it. I've also added a rename line to change ...
Shane Cusack's user avatar
1 vote
2 answers
689 views

Passing a variable to a variable within a batch file

I'm grabbing a value from the registry assigning it to %%b and trying to pass %%b to another area within the batch file as shown below. But it comes out as %b. It does not pass the variable a second ...
GenShira's user avatar

15 30 50 per page