[Solved] How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt

 How to Delete or Remove autorun.inf File

How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt



USB flash drive gets easily infected by virus and spread to computer to which it is inserted. The autorun.inf is one of such common virus file which spreads all over your partition usually comes from USB flash drive. It is a read-only, hidden and system file disabling folder option. It spreads to the windows system when you try to open the USB flash drive.
Now, how to delete or remove autorun.inf file from your USB flash drive? The simple method to delete or remove the file is the use of cmd commands.

To delete the file just follow the following steps :

 Step 1 :                                                                                                                                                 



How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt


Go to Start.


How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt



It opens the Start window as seen above image.

 Step 2 :                                                                                                                                                



How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt

Type Run in blank space. It will show Run and then select Run or type Run and press Enter.

How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt

It opens the open Run window.


 Step 3 :                                                                                                                                                


How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt





Type cmd and click OK or type cmd and press Enter.


How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt



It opens the Command prompt window.

 Step 4 :                                                                                                                                                

How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt

Type g: and press Enter.


Note: g denotes the USB flash drive alphabet. In my PC, the USB flash drive alphabet is G so I typed g:.


How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt

 Step 5 :                                                                                                                                                

How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt

Type attrib -r -h -s autorun.inf and press Enter to change its file properties.


How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt



If the command executes successfully then it comes G:> prompt again as above.

 Step 6 :                                                                                                                                                

How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt
Now, type del autorun.inf and press Enter to delete the autorun.inf file.
How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt



If the command executes successfully then it comes G:> prompt again as above.


Now, check your USB drive and it should be free from autorun.inf.


Please comment and share if you like this post on How to Delete or Remove autorun.inf File from Your USB Flash Drive Using Command Prompt.

Thank you.


Leave a Comment