Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

How to seach *.mp3 etc using batch

Original Message
Name: sufian
Date: November 18, 2007 at 07:44:33 Pacific
Subject: How to seach *.mp3 etc using batch
OS: Vista
CPU/Ram: 1.8Gh\2GB
Model/Manufacturer: HP TC4400
Comment:
Hi,

I need help on how to write a script using batch to search for a particular file ext ie *.mp3 or *.jpg and save the particular file on a new created folder?



Report Offensive Message For Removal


Response Number 1
Name: cup
Date: November 18, 2007 at 17:18:23 Pacific
Subject: How to seach *.mp3 etc using batch
Reply: (edit)
Looking for files dir /b /s *.mp3 *.jpg
Creating folder xxx mkdir xxx
Copying a to b copy a b

Look up "for /F"

If you put those bits together, you'll probably get what you want.

To get help on for, type for /?


Report Offensive Follow Up For Removal

Response Number 2
Name: sufian
Date: December 1, 2007 at 05:37:50 Pacific
Subject: How to seach *.mp3 etc using batch
Reply: (edit)
Sorry for the late response.

Thanks for the tips anyway:)

This is what I have:

:BACKUP
set /p inputvar=Please enter file type you to move to log file:%1
dir /s/b c:\users\*.%inputvar% >> list.txt
Echo Backup Complete
pause
cls
goto start

But if I search for more filetype and move it to list.txt, it will show all in the list.txt.
How do I go about if I want to move different filetypes to different list.txt ie if I search JPG it will move to list.txt, then if I search again for MP3, it will automatically name the log file list1.txt etc?

And how do search for files using date modified ?To know what file has been modified today or within 7 days?

Sufian


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: How to seach *.mp3 etc using batch

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




XP Installed to G?

exessive internet traffic

ZoneAlarm Question. Blocked Connect

Windows Live Messenger Problem

Delete $Uninstall after SP3 updates


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC