PC Review


Reply
Thread Tools Rate Thread

Deleting multiple files, maybe using an input file?

 
 
Rick
Guest
Posts: n/a
 
      10th Mar 2008
Hope someone can help -- I need to delete about 50 unrelated files (with
no easily-matching patterns in their filenames) from a single directory.
I need to do this on the same directory on several different servers. I
have all 50 of these filenames to be deleted inside a text file. Is
there some way in XP to easily delete all 50 of these files, perhaps
using my text file as some sort of input file? Maybe a third-party
utility of some sort? Thanks.
 
Reply With Quote
 
 
 
 
HEMI-Powered
Guest
Posts: n/a
 
      10th Mar 2008
Rick added these comments in the current discussion du jour ...

> Hope someone can help -- I need to delete about 50 unrelated
> files (with no easily-matching patterns in their filenames)
> from a single directory. I need to do this on the same
> directory on several different servers. I have all 50 of
> these filenames to be deleted inside a text file. Is there
> some way in XP to easily delete all 50 of these files, perhaps
> using my text file as some sort of input file? Maybe a
> third-party utility of some sort? Thanks.
>

if you know DOS you can turn your .txt files into a .bat file
("batch" file), with the string "del" without the quotes in front
of each extended file name (including drive letter and folder
names). A batch file is like a script, Windows DOS emulator will
execute each line as if you typed it individually in a Run box.
I've never actually tried this so at least part of my suggestion
may be bogus.

--
HP, aka Jerry

"Surely you jest - and don't call me Shirley!" - from the movie
"Airplane!"
 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      10th Mar 2008

"Rick" <news-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hope someone can help -- I need to delete about 50 unrelated files (with
> no easily-matching patterns in their filenames) from a single directory.
> I need to do this on the same directory on several different servers. I
> have all 50 of these filenames to be deleted inside a text file. Is
> there some way in XP to easily delete all 50 of these files, perhaps
> using my text file as some sort of input file? Maybe a third-party
> utility of some sort? Thanks.


You can do this with a batch file like so:
@echo off
set FileList=c:\files.txt
set Target=d:\User Files
for /F "tokens=*" %%a in ('type "FileList"') do echo del "%Target%\%%a"

Remove the word "echo" in the last line to activate the batch
file. Set "Target" to the desired folder name, e.g.
\\SomeServer\d$\Accounting


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading multiple files whose INPUT field have the same name Moskie Microsoft ASP .NET 0 4th Aug 2006 07:23 PM
Multiple Input files to an Append Query Andreww Microsoft Access 4 23rd Jun 2006 05:12 PM
User Input to open multiple files Mike D. Microsoft Excel Programming 2 16th Nov 2004 09:32 AM
Deleting multiple files =?Utf-8?B?TW9uaWNhIEI=?= Windows XP General 2 31st Jan 2004 03:28 PM
Multiple File Upload W/ One <input type=file> control Axe Microsoft C# .NET 1 14th Aug 2003 07:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:18 AM.