Computing.Net > Forums > Windows Server 2003 > Script to find files then delete, move, copy

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Script to find files then delete, move, copy

Reply to Message Icon

Name: amlife
Date: November 9, 2009 at 13:09:37 Pacific
OS: Microsoft Windows XP Professional
CPU/Ram: 2.992 GHz / 1014 MB
Product: Dell / Optiplex 170l
Subcategory: Configurations
Comment:

Hello
I need some windows help!

I was wondering if someone could help me with this.
I need to create simple batch file which can search for files based on extensions, and them execute command such as copy, move, delete.

I'm a linux person, as far i know I usually use find command
ex. find and remove file called filename
find / -iname filename -exec rm -rf {} \;

Regards



Sponsored Link
Ads by Google

Response Number 1
Name: Phatsta
Date: November 10, 2009 at 05:16:18 Pacific
Reply:

That should be easy enough, check this site out and you'll figure it out:
http://www.computerhope.com/batch.htm

If you know in what folder the files are simply use something like this (excuse me if I forget something):

-------------------------------------------------
@ECHO OFF
IF EXIST C:\Temp\*.rar THEN xcopy C:\Temp\*.rar C:\NewFolder ELSE
quit
-------------------------------------------------

If you want to get more advanced use VBscript:
http://www.computerperformance.co.u...


0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Script to find files then delete, move, copy

write a script to delete files 7 da www.computing.net/answers/windows-2003/write-a-script-to-delete-files-7-da/8492.html

Script to share and unshare a file www.computing.net/answers/windows-2003/script-to-share-and-unshare-a-file/5734.html

Files getting deleted automatically www.computing.net/answers/windows-2003/files-getting-deleted-automatically/2922.html