Skip to content

Commit 3dbe848

Browse files
authored
Merge pull request #3 from borekon/patch-1
Update README.md
2 parents 1517267 + ae56570 commit 3dbe848

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,23 @@ Currently only 64-bit (x64) is targeted.
2929
2. Download and install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) (any edition)
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`
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+
```

0 commit comments

Comments
 (0)