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.

  • 1
    Have to know which windows OS? I would address this as a selection problem like this by using "Search" , "Sort" , "Select" not having to batch anything. - - - - "Search" *.mp3 , there is every MP3. Add advanced search items like Date. Once you get a trimmed down enough "Search" then "Sort" use the Columns (size, Date modified date created, type) to "Sort", then Select the top item, hold the shift key, Select the last item needed to delete, and delete away. Search Sort Select. – Psycogeek Dec 19 '11 at 6:22
  • I had forgotten I could do all of that in search. I tinkered around a bit with it and eventually got the selection I needed. I'll mark Sathya's comment as the answer since it would definitely work with a bit of tinkering using the syntax page, probably a bit more efficiently and universally as well. – Mr. November Dec 19 '11 at 7:44
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.