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
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.
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
tbh this isnt really the best place to ask for VBscript help, there might be one or two experts here if your lucky, but i would do a search on google and find a vbscript specific forum.
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.