Computing.Net > Forums > Windows XP > batch file search

batch file search

Reply to Message Icon

Original Message
Name: AMD4Life
Date: July 24, 2006 at 19:02:06 Pacific
Subject: batch file search
OS: Windows XP SP2
CPU/Ram: Amd Athlon 64 X2/2 GB
Model/Manufacturer: custom
Comment:

I am trying to create a batch file that will search a hard drive for all files with a .mp3 extension, then move the files it finds to another directory. I am completely new to batch files but would like to learn. Can anyone help me out?


Report Offensive Message For Removal


Response Number 1
Name: DosItHelp
Date: July 24, 2006 at 20:58:57 Pacific
Reply: (edit)

Assuming all mp3 have unique names so that they don't conflict in the new directory, open notepad and copy the following lines into it:

@echo off
xcopy "c:\*.mp3" "c:\targetdirectory" /s

Note: replace targetdirectory with the right copy target and make sure it exist.
Then save the the file as CopyMp3.cmd on your desktop and run it from there.

DOS IT HELP?


Report Offensive Follow Up For Removal

Response Number 2
Name: ham30
Date: July 25, 2006 at 11:22:13 Pacific
Reply: (edit)

If it's not necessary to use a batch file. You could use the XP search facility to search for *.mp3. Then select all the files and copy them to 'wherever'. That way only the MP3s will be copied and not their folders.

Do yourself a favor BACKUP!


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: batch file search

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge