File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,3 +29,23 @@ Currently only 64-bit (x64) is targeted.
29292 . Download and install [ Visual Studio 2019] ( https://visualstudio.microsoft.com/downloads/ ) (any edition)
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 `
32+
33+ ## Sample scripts
34+
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:
38+
39+ ``` bat
40+ for /f "tokens=*" %%i in ('dir /a:d /b') do (
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"
50+ )
51+ ```
You can’t perform that action at this time.
0 commit comments