Link to home
Start Free TrialLog in
Avatar of td13
td13

asked on

cannot delete nul: the parameter is incorrect

I have a problem with my flash disk. It has a folder named autroun.inf. Inside that folder, there is con folder. Inside con, there is aux, and inside aux there is nul folder
I can't delete the autorun.inf folder because of the last folder I mention. How to solve this problem? Can somebdoy help me?
Avatar of edbedb
edbedb
Flag of United States of America image

I have never had that problem, but here are a couple things you can try.
How about Renaming it. Doing an error check on that drive might fix it. Can you move it?
Try using this program Unstoppable Copier...it copies anything http://www.roadkil.net/
Once copied, change the attributes of the files you cant delete to file is ready for archiving, deselect hidden and read-only.
Now try copying them back with this same program.
 
If you just format the disk everything should be erased from it
that takes just a few minutes
If you do that then where is the fun of "fixing" it. I mean...format is a given. But if is a U3 drive with a bunch of installed apps and nicely configure then you would have to start from scratch.
ASKER CERTIFIED SOLUTION
Avatar of dbrunton
dbrunton
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of td13
td13

ASKER

I can't rename the nul folder either aux and con too.. I try to use microsoft way, it didn't work either. Using del command, it comes up with message "The filename, directory name, or volume label syntax is incorrect"
Then I use RD, it comes up with "the directory is not empty". Still don't know how to solve it. I will try with linux way
td13

I'm not sure if you are aware, but the presence of an "autorun.inf" file in the root of a USB Flash Drive MAY be the sign of a virus that could have infected any PC it has been inserted into.  I believe that is how the "Conficker" virus was or is propogated, but even if it isn't that virus, there are loads more that spread using the same method.

As BitsAndBytesAndMore has said though, it could be that the "autorun.inf" is supposed to be there to run legitimate programs on the Flash Drive.  Certainly if you have eer installed any "Portable" applications to the drive, then the *.inf file may be there to run them.

I think this is suspicious with there being folders named CON and NUL, for reasons explained by dbrunton.

Hopefully you can get rid of these using the previously suggested methods, but I would urge you to fully scan every PC and laptop that the Flash Drive has been inserted into with good AntiVirus software and AntiSpyware programs just to be sure.  Also treat all other Flash Drives you have used recently as potentially infected.
change E: in the following commands to the drive letter of your flash drive and run them at a cmd prompt.

RD \\.\E:\autorun.inf\con\aux\nul /s /q
RD \\.\E:\autorun.inf\con\aux /s /q
RD \\.\E:\autorun.inf\con /s /q
RD \\.\E:\autorun.inf /s /q

Be aware that the above command is telling the flash drive and the OS to remove quietly these directories. If, as mentioned above by BillDL, you need these directories.... your U3 or other legitimate apps will fail.
I would first scan the flashdrive and your system for viruses and malware.
To Scan for malware:

Go into Safe Mode.
Then go to this website and download these programs:
MalwareBytes Anti Malware.... http://www.malwarebytes.org/mbam.php 
and/or SuperAntiSpyware http://www.superantispyware.com/ 
Make sure you update to the latest versions.

Once downloaded (you may need to rename MalwareBytes, Combofix or other tools before saving their files to the desktop as Malware can recognize the name and block them unless renamed)

While still in Safe Mode, Go to Start-Run and type:

Msconfig

Once in the application, go to the services tab and "hide all Microsoft services" select the remaining and disable". Then go to the Startup Tab and disable all entries.
Reboot.
After the system boots it will give you a warning regarding the changes made by msconfig. Select do not warn me again.

Now you can run the anti Malware applications recommended above.
 
If the problem persists...go to http://www.bleepingcomputer.com/combofix/how-to-use-combofix  and follow the instructions.  
 
Avatar of td13

ASKER

I think this is caused by an antivirus. I forgot what is the name of the antivirus. Thx 4 all the solutions.
dbrunton: it really was a great answer.... Congrats.!!