Skip to content

Commit ae56570

Browse files
committed
Update README.md
Add another sample script and minor wording tweaks
1 parent 3e91701 commit ae56570

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,22 @@ Currently only 64-bit (x64) is targeted.
3030
3. Download [nasm](https://www.nasm.us/) and place `nasm.exe` somewhere into your `PATH`
3131
4. 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
3840
for /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
```

0 commit comments

Comments
 (0)