File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,12 +30,22 @@ Currently only 64-bit (x64) is targeted.
30303 . Download [ nasm] ( https://www.nasm.us/ ) and place ` nasm.exe ` somewhere into your ` PATH `
31314 . Open ` jpegoptim.sln ` and build, or run ` build.bat `
3232
33- ## Sample script
33+ ## Sample scripts
3434
35- There's a sample script that loop all the subfolders in a folder optimizing pictures.
35+ ** WARNING** : The following scripts optimize the images in place! Remember to make a backup before running them.
36+
37+ Here's a sample script that loops through only the first-level subfolders in a folder optimizing all pictures:
3638
3739``` bat
3840for /f "tokens=*" %%i in ('dir /a:d /b') do (
39- jpegoptim.exe --preserve --verbose --totals "%%i\*.jpg"
41+ jpegoptim.exe --preserve --strip-all --totals --verbose "%%i\*.jpg"
42+ )
43+ ```
44+
45+ Here's another sample script that loops through all subfolders in a folder optimizing all pictures:
46+
47+ ``` bat
48+ for /f "delims=" %%i in ('dir /b /s *.jpg') do (
49+ jpegoptim.exe --preserve --strip-all --verbose "%%i"
4050)
4151```
You can’t perform that action at this time.
0 commit comments