linking dir to find batch...

  djbenny 16:17 30 Nov 2007

i am trying to use a batch file to find and list all the .mp3 files on the whole harddrive i found this command but it doesnt seem to be working correctly

dir C: /s | find "" *.mp3

any help?

  djbenny 16:41 30 Nov 2007

hmm needed urgently

  brundle 17:02 30 Nov 2007

Why do you need to use a pipe to FIND? Is it part of a longer batch file?

Dir c:*.mp3 /s

  brundle 17:05 30 Nov 2007

dir C: /s | find /I ".MP3"

  recap 17:05 30 Nov 2007

Try this

@echo OFF
C:/ find "" *.mp3

  djbenny 18:09 30 Nov 2007

dir C: /s | find /I ".MP3"

this worked but im now trying to move all the mp3's found into a folder

dir C: /s | find /I ".MP3" | move *.mp3 C:\delete

but the error duplicate file exists comes up

  brundle 18:40 30 Nov 2007

Is that because the batch file doesn't generate any folders? Would it be easier to use XCopy?

xcopy C:\*.mp3 c:\DELETE /C /S

Then use a wildcard command to delete the MP3s from the folders click here, and RMEMPTY to delete the empty folders.

click here

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5 review

Alice Saey's mesmerising animation for Dutch singer Mark Lotterman

iPad Pro 10.5in (2017) review

Comment booster votre iPhone ?