New answers tagged

0 votes

How can I skip a cycle in a FOR loop?

Try using For /F... and ... | findstr /c:"string1" /c:"string2"... Use a loop that allows you to filter the strings and thus give more control over the actions with the resulting ...
Io-oI's user avatar
  • 8,140
1 vote
Accepted

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

For me this works, I hope it is as your intended. I filled the batch code with comments to explain what every command does (or most of them). Test this only on a copy to see if it works as expected. ...
Ricardo Bohner's user avatar
18 votes
Accepted

How can I skip a cycle in a FOR loop?

Just place a label :nextiteration (or whatever other name you like) as the last statement inside the for-loops body and goto to that label when you decide that you can skip the rest of the for-body. ...
Tonny's user avatar
  • 31.2k
4 votes

How can I skip a cycle in a FOR loop?

Windows batch doesn't have too many options for skipping an iteration of the loop. The methods you may use are: Put an IF block around the part of the loop that you would like to skip: @Echo Off if A ...
harrymc's user avatar
  • 476k
1 vote

How to add a numerical password in BitLocker?

Find the solution to solve this problem.: manage-bde -protectors C: -add -RecoveryPassword This command automatically create the password. And if policy is working correctly was synchronised with AD....
Darbas Darbas's user avatar
0 votes
Accepted

Passing a variable to a variable within a batch file

Without wanting to be repetitive, but what happens inside the For loop is valid inside the loop, unless you define it inside the For loop for use inside or outside the loop. But it may also occur to ...
Io-oI's user avatar
  • 8,140
0 votes

Passing a variable to a variable within a batch file

%%b is only valid inside the FOR loop. You should replace echo %%b by set var=%%b, then use %var% in the following code. You may put echo %var% after the FOR loop to verify its value.
harrymc's user avatar
  • 476k
0 votes

How do I create a better drag and drop .BAT file that processes as many files as I select?

set "vlcConvert=C:\Program Files\VideoLAN\VLC\vlc.exe" for %%a in (%*) do "%vlcConvert%" %%a --no-random --sout-file-format --sout=#transcode{acodec=s16l,channels=2,samplerate=...
Zovereign's user avatar
1 vote
Accepted

Complex escape coding in a batch for-loop

@echo off set "_Math=*" set "_Calc=3*1073741824" set "_PSSctr=%tmp%\PS~MathTemp.ps1" 2>nul del /q /f "%_PSSctr%" > "%_PSSctr%" ( ...
Io-oI's user avatar
  • 8,140
0 votes

What are the correct tags to use in a .bat file for 7-zip to achieve the same settings as the GUI?

The solid block size limit is 2^64 - 1 bytes, as stated in this thread on 7-Zip's SourceForge. 2^64 - 1 bytes 18446744073709551615 bytes B 18014398509481983 kibibytes KiB 17592186044415 ...
Vopel's user avatar
  • 166
3 votes
Accepted

How to convert Samsung's motion photos to still photos?

In "motion photos", the short MP4 video clip is added to the JPEG trailer. The clip can be stripped out by the ExifTool program: https://exiftool.org/forum/index.php?topic=10133.0 exiftool -...
Xavier Poinas's user avatar
0 votes

Check if netsh wlan connect failed in batch script

You want to wait for a few seconds and check out the connection state of the wireless LAN interface with netsh wlan show interfaces. That’s what friedrith/node-wifi does. netsh wlan show interfaces ...
Константин Ван's user avatar
1 vote

How to Batch Apply Multiple Commands? FFmpeg

This would mix all videos in folder with the same audifile Audiofile.mp3, speed up video and audio by 50% and apply a text on the screen: for /f "delims=" %f in ('dir /b folder\*.mp4') do ...
Ricardo Bohner's user avatar
0 votes

Run a CMD comand from a key stroke?

Unfortunately this seems to depend on the OS. In Linux Debian 12, in the main menu under 'Keyboard Shortcuts' there is the predefined key combination for 'Run a terminal' as Ctrl+Alt+T.
eromana's user avatar
  • 122

Top 50 recent answers are included