General discussion

Locked

Fast File Delete

By justaperson ·
I have a file structure on 200 PCs that needs to be deleted rapidly. The structure contains 84,000 files and is 400MB in size. Is there any way to rapidly delete this data, such as was possible with deltree on FAT operating systems? It currently takes about an hour to delete the data.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by BFilmFan In reply to Fast File Delete

Assuming a Microsoft OS. Try this:

If you just want to delete everything in a certain directory, you could create a batch file containing the del *.* command and schedule it periodically. Open notepad (start -> run -> notepad) type in "del c:\tmp\*.*" (substituting the proper path) and save as a batch file (.bat extension, not .txt). Or you could write a vbscript if you need a little more flexibility, for example, you could open notepad and copy the following script (which deletes everything in a certain directory that was created more than one week) into it and save as a vbscript (.vbs extension, not .txt).

'*************************************************************************
'*************************************************************************
dim aweekago
dim dir

dir = "c:\tmp"
aweekago = date -7

Set fso = CreateObject("Scripting.FileSystemObject")
Set fldr = fso.GetFolder(dir)
For Each file In fldr.Files
If file.datecreated < aweekago then file.delete
Next
'*************************************************************************
'*************************************************************************

Sure, you can automate either one (.bat or .vbs) through scheduled task. Start -> Settings -> Control Panel -> Scheduled Tasks -> Add Scheduled Task. Or you can assign it through the "AT" command as well. Just go to a command prompt (Start -> Run -> cmd) and type "at /?" to see a full description of the command and its parameters. The AT command is helpful, because you can easily schedule tasks on remote machines as well.

Collapse -

by justaperson In reply to Fast File Delete

Thanks for your response, but I need to clarify the issue. This is for Windows XP systems. This delete is a one-time occurrence which has to be accomplished by the Administrator.

Collapse -

by TonytheTiger In reply to Fast File Delete

Some ideas.

You could do a "net view" redirected to a text file which will give you a list of computernames in the domain. Then make a batchfile doing what you want to each machine and run it on each machine (from an administrator's machne) with "FOR /L" to read the machinenames from the file you created.

From a command prompt, type FOR /? for details on how to use the command.

Collapse -

by justaperson In reply to

Poster rated this answer.

Collapse -

by justaperson In reply to Fast File Delete

Thanks for your input. These laptops are not connected to a domain or traditional network. There is no way to remotely access them. I have problem with putting "hands on" each device, but do not want to spend 1-2 hours deleting files.

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums