# How to delete autorun.inf with command prompt



## CadCrazy (Nov 17, 2007)

I used dir/ah to view hidden files on c drive. Autorun.inf files is present there but when i try to delete it using   "del autorun.inf " command , i get error file not found. plz help


----------



## vish786 (Nov 17, 2007)

change attribute of autorun.inf & then u can easily delete it.


----------



## tanvi chaturvedi (Nov 17, 2007)

u can change the attribute usin attrib commmand in cmd...

fr more help u cn type in attrib/? in cmd prompt n u'll get a complete list of the symbols whch cn be used wid the attrib command...

try out it will help!!


----------



## ravi_9793 (Nov 17, 2007)

let us take you want to delete autorun.inf file from D:\ drive
For this type:
del d:\autorun.inf


----------



## Vishal Gupta (Nov 17, 2007)

Give following commands:


```
attrib -s -h -r autorun.inf
del autorun.inf
```
It should work.


----------



## himanshumaker (Nov 17, 2007)

try this it will work

erase aurorun.inf /f  /a -r
that will delete file from the disk without asking u


----------



## utlnoel (Jan 16, 2009)

Thanks it works...


----------



## Shash (Jan 16, 2009)

hii everyone. I have the same problem on my pen drive.
I get the attribute command to work.

But when i type 'del autorun.inf',
I get a msg that the file is inaccessible, because it is being used by another program or process.
Can anyone help?


----------



## ashisharya (Jan 17, 2009)

attrib -s -h -r autorun.inf
del autorun.inf


----------



## infra_red_dude (Jan 17, 2009)

Shash said:


> hii everyone. I have the same problem on my pen drive.
> I get the attribute command to work.
> 
> But when i type 'del autorun.inf',
> ...


Then best thing is to boot into Safe Mode and then goto command prompt and change to that drive and type:


```
attrib -a -s -h -r autorun.inf
```

*then*


```
del autorun.inf
```


----------



## loGos (Jul 23, 2009)

helo= there.  I have tried many things now to remove trojan virus  it does not budge  to any of it.  is there anything else i could do.


----------



## phuchungbhutia (Jul 23, 2009)

If some process is using it then kill that process and del it . . Unlocker can do that . .


----------



## paroh (Jul 23, 2009)

Shash said:


> hii everyone. I have the same problem on my pen drive.
> I get the attribute command to work.
> 
> But when i type 'del autorun.inf',
> ...



I recommened  u to install USB Disk Security.


----------

