|
Answer» I'm a newbie and need some help from you, the experts
I am in need of a batch file that can help me to automatically change the attribution of a specific file in a specific location and then delete it. In my case, the file name is autorun.inf (with attribution System, hidden, read-only on it) located in an USB STORAGE device.
I started my batch file by using notepad with the content like this: Code: [Select]attrib autorun.inf -s -h -r del autorun.inf My problem is that I can only execute the batch file in the root directory of my USB storage device to delete the file autorun.inf. Can you help me to improve the batch file so that I can run it in any PC (other location than my USB storage device) and get the file autorun.inf deleted.
All things are done in the built-in MS.DOS of Microsoft windows XP (SP 2)
P.S: the autorun.inf I mention above can be exploited to automatically run virus files upon navigating to the USB storage device from My Computer. I think that by deleting autorun.inf, I can no longer suffer this. But, like everyone, I want the batch tool easy to use just by the double-clicking of the mouse.
Thanks for all your help!So bored to wait for a reply, I get myself out this way:
Code: [Select]@ECHO OFF ECHO Please Enter your removable drive letter SET /P CHOICE="Letter: " ATTRIB %CHOICE%:\autorun.inf -s -h -r DEL %CHOICE%:\autorun.inf EXIT
I'll appreciate if someone help me to rebuild this batch file with the same purpose but user do not need to enter anything. You should not hijack other people's threads. Start a new one. Quote from: Dias de verano on OCTOBER 02, 2008, 10:22:55 AM You should not hijack other people's threads. Start a new one.
Yes, agreed.Split.Thanks! I'm new here and so shy to post a new one! Sorry
Nice day! Dias de verano ^^!
|