1

So Google Music decided to download about half of my uploaded music library to my local music library when I told it to download my purchased music, so now I have a bunch of MP3s I need to delete automatically.

Can I get any help here? I'm not so great with batch script.

2 Answers2

3

You can use forfiles

forfiles /p g:\music /d -30 /c "cmd /c del @file"

This will delete any file older than 30 days.

Read about forfiles syntax here

If it's not there in your system, download forfiles from MSFT's Reskit ftp

1

For another command script way to do this, using JP Software's TCC/LE, simply use date ranges and the del command:

del /[d2011-12-19] *.mp3

Yes, you can do the last 30 days, too:

del /[d-30] *.mp3

Further reading

JdeBP
  • 27,556
  • 1
  • 77
  • 106