Jonah
Jonah

Reputation: 2080

How to do multiple things to each file in a directory with a batch script

This is a direct extension of this question:

How to do something to each file in a directory with a batch script

From the above I leaned how to execute a command for every file in a folder.

How do you execute MULTIPLE commands for each file? I want to first use lame to compress the file, then MOVE the original file to a different directory

This is what I have so far:

FOR /r cutAndPendingCompression %%f IN (*.*) DO lame %%f compressed\%%~nf -m m -b 16 --vbr-new -V 9 --scale 2.5

Upvotes: 7

Views: 6033

Answers (1)

Jonah
Jonah

Reputation: 2080

This did it

FOR /r cutAndPendingCompression %%f IN (*.*) DO (
lame %%f compressed\%%~nf -m m -b 16 --vbr-new -V 9 --scale 2.5
move %%f cut\%%~nf
)

Upvotes: 7

Related Questions