Sign in with
Sign up | Sign in
Your question

To delete all files including rar and zip from external drive

Tags:
  • External Drive
  • Zip
  • Windows XP
Last response: in Windows XP
Share
February 25, 2009 4:58:03 AM

Hi sir,


I have a query regarding vbscript.My question is i want to delete all the files including .rar,zip and other when i insert any external media to my pc.Plz help me

Thanks in advance

More about : delete files including rar zip external drive

February 25, 2009 1:51:18 PM

You can do it with a batch file but your question may be more difficult as you say "any' external media.
If you insert more than one external device you must be concerned with drive letters.

For example del e:\*.rar /s will delete all rar files on the e: drive including all sub directories but if you have a external HDD that is e: and put in a flash card the card will become f: and you may end with undesired results.

Being that external devices insertion can be dynamic I dont think a script can be used.
I believe that it will have to be done manually and with a varible so as to ask which drive do you want to do this to.
m
0
l
February 26, 2009 6:36:53 AM

pat mcgroin said:
You can do it with a batch file but your question may be more difficult as you say "any' external media.
If you insert more than one external device you must be concerned with drive letters.

For example del e:\*.rar /s will delete all rar files on the e: drive including all sub directories but if you have a external HDD that is e: and put in a flash card the card will become f: and you may end with undesired results.

Being that external devices insertion can be dynamic I dont think a script can be used.
I believe that it will have to be done manually and with a varible so as to ask which drive do you want to do this to.


Thanks 4 ur reply, but i am newcommer in this field so will help me to the send code of the script file and how i will attach it with the autorun.inf??

Thankx in advance
basically i hve an external hrd disc so i want to delete all the file automatically when i insert it in my usb
m
0
l
Related resources
!