Files & Folders in USB turn into Shortcuts in Windows 10

We all use the USB as the detachable drive to transfer data since it’s convenient to carry and can be easily operated plus it provides great speed in data transferring. Today, I came around a weird issue on my USB drive, which I think I should share with you all. I plugged my USB into my colleague’s laptop to transfer some files. When I plugged the USB back to my Windows laptop, the files & folders in USB turn into shortcuts


This was crazy and I couldn’t delete these folder shortcuts, because the target file location was Command Prompt itself. Also, you can’t move or delete the files stored in the front. In addition to this, there was a .Trashes folder inside the USB. It led me to suspect that some sort of virus may have got admitted into my USB. I didn’t waste any time and scanned the USB using my native security suite, i.e., Windows Defender. Windows Defender, on its part, found something malicious. It performed some cleaning action and asked me to reboot. I did it, but there was still no change in the situation, as far as USB drive was concerned.

I searched on the Internet & came to know that there were many others like me facing this weird issue. I found a working solution and consider it worth sharing it here. Create a system restore point first before you proceed.

Files & folders in USB turn into shortcuts

1. Make sure that you have Hidden Files checked on in the ribbon inside Windows File Explorer. Now open the Command Prompt with administrative privileges and type this command and hit Enter. Here, substitute h: with your USB drive letter.

attrib -h -r -s /s h:\*.*


2. After doing this, come back to the USB drive, you’ll find that command has been executed, but the shortcuts are still there. Since the files got executed, you can move them easily to your desired target location.


3. Move all the necessary files to the desired location, and let the shortcuts remain as it is. After this, format the USB drive. Next, run the System File Checker scan to the Windows. Also, run a complete scan using Windows Defender, or any anti-virus you’re running.

4. Copy your data files back.

This should resolve the issue.

A little off the subject, but you definitely want to have a look at this comprehensive list, if you are looking for some free software for Windows.

Posted by on , in Category Windows with Tags
An Electrical Engineer by profession, Kapil is a Microsoft MVP and a Microsoft Content Creator. Please read the entire post & the comments first & create a system restore point before making any changes to your system.


  1. or save the following in a .bat file to make it easier to use

    title Fix files and folders turned to Shortcuts in USB Drive
    @echo off
    echo “Enter Drive letter”
    set /p driveletter=
    attrib -s -h -r /s /d %driveletter%:*.*

  2. ^^ Why making it messy? It will also do the same job.

    Wouldn’t be it’s just easy to execute a simple command as mentioned in the article 🙂

  3. quite the same, yea, i agree.
    but just to make it an easy reminder if you forget that command, just know the drive letter and you’re done
    besides it can be helpful if somebody had that problem, just send the file and it’ll do the work for them instead of explaining what the drive letter is, and bla bla bla,

  4. ^^ In that case, OK. Provided, computer must recognise the USB drive letter, otherwise user has to again modify the .bat file.

  5. Ramki Chowdary

    Is there any permanent solution? I scanned those shortcuts with popular antiviruses like bit defender, Kaspersky, e set smart security, avg internet security & windows defender also. But the scan results are showing the files are clean.

  6. ^^ Correct. These shortcuts are not viruses so no security suite will be find them malicious. In my case, System File Checker did the job and my USB works fine now. Reinstallation of Windows will be a definite fix AFAIK 🙂

  7. fOOnOOn

    This recovered files but not folders! Is there any way to recover folders?

  8. Endezeichen Grimm

    It doesn’t work

  9. Helga

    Thank you so much! This fixed my problem.

  10. chandrahas

    thank you your suggestion has worked

  11. Lashan

    This solution is written for a computer technician….i couldn’t do the 1st step…which is run command prompt…

  12. Bheks

    Hi my challenge is that the folders on my Nokia E7 turned to short cuts, however my computer does not assign a drive letter to the phone it recognises it as a portable device with no assigned drive letter.

  13. ^^ This could be the virus issue pertaining to phone.

  14. Roha Bhatti

    I connected my mobile via usb port to my pc and directly tried to download some songs. My cell phone memory and sd card both have got infected by this virus. I have recovered my files, formatted device many times, typed this command in C.prompt but all in vain. Whenever I copy a photo or song in it, it again turns into a shortcut. In short, I just cannot remove the virus completely. Worried 🙁 Please help!
    P.S. I just connected my another usb to my pc and Holy Crap! All the files in it also have got infected. @kapilarya:disqus

  15. Dev

    i did the 1st step bt when i came back to the USB drive, i won’t find that command has been executed.

  16. Dev

    plz help me sir

  17. harmon aguilar

    Try this Powerful Antivirus Software, Small but Download here..

  18. Noralene

    Did all the above steps and everything worked, except for when I copied my files back to USB drive, it switches to shortcuts againg. Any advice?

  19. F44

    Yes; I tried this way and it worked in some cases…..sometimes it doesn’t work…any other helps?!

  20. ferodox

    when I try this command, I see “path not found – F:” … what can i do?

  21. ^^ Recheck the command variables 🙂


    USB Shortcut Recover is a
    free tool to recover data from corrupt USB sticks or hard disks infected
    by a Shortcut virus. The program will restore the files and folders to
    their original locations prior to being infected with viruses. USB
    Shortcut Recover works with USB sticks, pendrives, SD Cards, and Hard

  23. shary

    its working but its the same issue when i plug the usb again

  24. ^^ What happen when you plug the USB to a different computer then?

  25. mary

    i dont understand what u meant by drive letter

  26. Gafurii

    my usb works perfectly in another computer …….
    when i come home the same problem with .Trashes shows i cannot delet files or format my USB

  27. ok, a little update here

    title Fix files and folders turned to Shortcuts in USB Drive
    @echo off
    echo Enter Drive letter to scan
    set /p driveletter=

    echo Don’t forget to remove startup items and check they are deleted from disk using Everything
    REM Check scheduled tasks as well

    echo Killing wscipt.exe Process
    taskkill /f /im wscript.exe

    echo Showing Hidden Files
    attrib -s -h -r /s /d %driveletter%:*.*

    echo Deleting shortcuts and infected files from disk
    del %driveletter%:*.lnk
    del %driveletter%:*..vbs
    del %driveletter%:*.vbs

    echo Deleting Infected Files from the computer
    del %temp%*.vbs
    del %temp%*..vbs
    del %appdata%*.vbs
    del %appdata%*..vbs

    REM Delete the startup item with extension .vbs (you do it manually for now)

    i saw that virus with a lot of friends. save the above to a .bat file and it should remove it from the computer as well, the .bat file must be run as an administrator, and after it’s done. you should delete the startup entery created by the file. i couldn’t figure out how to do it from the batch file yet, so i do it manually for now till i find a way. if you got any, please let me know

  28. ^^ Please try this command in administrative Windows PowerShell after trying the command mentioned in article:

    Repair-WindowsImage -Online -RestoreHealth

  29. Bingo Pitjama

    I did everything above and still no permanent fix. But when I updated windows, the Windows Malicious Software Removal Tool found that virus and removed it by itself permanently. This is what you should do too.

  30. rajat Harmalkar

    Kapil arya

    Just tell me does it works for external hard disk ….
    If yes does it takes long time ?depending upon data…

  31. Jspn

    super! thanks a lot for posting this! I have been through other posts claiming that it fixed the problem and I have to install so many programs which is really a hassle. I’m glad to stumble upon this one.

  32. ^^ It should work, although I haven’t tried it on external hard disk 🙂

  33. saikumar

    hey pls send some information about…

    my pendrive storage shows full…
    but it didn’t shows any files or folders or shortcuts…

    how to make original folders…… pls give me suggessions….

    ur’s saikumar

  34. ^^ Make sure the files and folders are not set to Hidden. You can also try plugging USB to different computer and see if you see any differences.

  35. Alei-Eldeen Mahammad

    Gee, I get Access denied -_-

  36. ^^ Make sure you’re running Command Prompt as administrator.

  37. Portia Quijano

    In my case I already have the original folder and the shortcut files of the original folders. I wanted to delete those shortcuts, what should I do?

  38. Pontificating Pensadora

    Hi, so I was able to get rid of the virus, but now the folders are not even showing up as shortcuts. What’s interesting is the other files such as pictures and songs are showing up (they were not in folders). I have tried changing the folder options -> show hidden folders, but I don’t think that’s the problem. I have scoured the internet and not found any solution. Thank you.

  39. Chaitanyamayee

    Why it is showing Not resetting hidden file?

  40. ^^ Can’t get you? You want to know why the command prompt not showing processed files?

  41. Nazriya

    Thank you so much!!This worked 😀

  42. Vishal

    hey please write some easy language for this, because I can not understand what is written in the first step :/

  43. Moses

    I have found a very easy and fast way out. In Window 7 right click the USB or Folder, Click property, then Hardware, then click Volume. Below the box CLICK POPULATE. Bingo

  44. Ankit

    hi bheks ! had you find some solution ? I also got stucked with this problem.

  45. ^^ Try connecting your phone to a different computer, see if that helps 🙂

  46. MB Rubel

    It’s just awesome and works magically#Meena Bassem

  47. Yathish Mallesh

    Hi, I entered the attrib -h -r -s /s /d L:*.* as shown by you, but cmd displayed ‘attrib’ is not recognized as an internal or external command,operable program or batch file, so I modified folder options by unchecking protected files option..
    but still I got the same message by doing so, Please help me I cannot use my pendrive outside also even file copying in my system is much slower after this rubbish shortcut virus affected my system,help me…

  48. ^^ Make sure you’re using administrative Command Prompt 🙂

  49. Yathish Mallesh

    I am the adminstrator of my system, I typed cmd under start button

  50. Yathish Mallesh

    Hey I included the path of system32 in environmental variables, it worked… thanks, finally one more question after formatting, the virus will not again affect me pendrive?

  51. ^^ We hope so, if you have followed all the instructions mentioned in the article 🙂

  52. Yathish Mallesh

    Thank you!!

  53. snopy

    hi, i hv shortcut files on images,videos ,folder like it showen above in win7 ,c drive …when i try to open the files it says delete the shortcut…also i wud like to knw what Advanced Attributes should i keep for the folder?…n what Security name user or admin

  54. Andreas Meyer

    Got this at a shop on my scandisk. Tried the above but doesn’t work.

  55. Dhruv

    Kapil Arya- What about the virus inside my lappy now!!!
    Whichever pendrive i use is shown as if infected with the same virus!!
    Moreoover my windows crashed… first the Bluetooth and then the wifi went hey-wey, later the MS Office went crazy!

  56. ^^ Read the 3rd step, last two lines. If your system still have virus, try to Reset it, see if that helps.

  57. Pisa

    does it mean that mac laptop is having virus?

  58. venkatesh

    i tried that trick but still there only shortcuts it doesn’t execute any files.please tell me another way

  59. misaniwantorap:)

    Anyone help…I don’t really know how to get this thing solve but now my big problem is my stuff in the USB. All my movies are gone.. I can’t find it anywhere. like the article said mine was a recyclebin folder in my USB. A hardisk actually. What should i do? Please help me. I desperately need my things back… TAT Anyone can help please email me-

  60. willie

    Hi Portia, you should copy the original folders to your desktop and format your flash drive. After formatting, copy your files back…

  61. Hasnain Naeem

    I have done this with my C drive what to do know ? 😀 please tell me all the system files are now appearing everything messed up

  62. Kevin Dondrea

    The problem with Folders being shortcuts is “User Error”. When you drag and drop it’s a crap shoot on whether you get a shortcut or the file. You should Always “Right Click and drag”. This gives you the option of Copy, Move or Create Shortcut. The drag and drop problem first started back in Windows 95. I made the mistake 1 time, that was the last time.

  63. Kevin Dondrea

    Right click on the files and take Ownership. If the files are truly files then you will be able to edit, copy and move them. But if they are truly shortcuts you should be able to delete them.

  64. Kevin Dondrea

    My Nokia X works perfect in Windows. Do you have Mapped Drives? If so your Nokia could be hidden by the mapped drive letter. Check Computer Management to see what drives are listed. It’s possible the Nokia is there but doesn’t have a drive letter assigned.

  65. Kevin Dondrea

    Your problem may be you actually created shortcuts on your USB not actually copying the files and folders. Right Click, drag and drop is the best way to go.

  66. Mohammad Iftekhar Yezdani

    Awesome ! Hail Meena

  67. Endezeichen Grimm

    No, it is actually a known glitch.

    I was able to save the valuable info and just reformat the damn thing.

  68. A Wong

    Hi Meena,

    I tried the .bat file you wrote, however I get an error message when running it as an Admin in Windows 7:
    Also, the original files show up under the shortcuts, but then disappear again. Any help is much appreciated.

  69. Guest

    install usbfix. download it on the internet for free
    done installed
    insert ur infected USB
    run USBfix – click Clean

  70. antonio hermosa

    nstall usbfix. download it on the internet for free
    done installed
    insert ur infected USB
    run USBfix – click Clean

  71. antonio hermosa

    Download USBfix on the internet for free
    Installed it
    insert ur infected USB
    run USBfix – click Clean

  72. antonio hermosa

    Download USBfix on the internet for free
    Installed it
    insert ur infected USB
    run USBfix and then click Clean

    i tried it and it’s effective

  73. rocky

    hello please help for my problem
    i buyed new processor and motherboard 15days before everthing was working well
    and now whenever i connect any usb inside it all files becomes as shortcuts
    so i formated HDD and deleted all partiton and creat new but again i checked connecting usb same shortcut appeares, i formated usb even i scanned antivirus nothing is found.
    please help me Asap.

  74. ^^ Have you tried this fix?

  75. Chetan Atri

    please help me guys i have typed the same as u suggested but an error is showing “attrib” is not recognized as an internal or external command.please help me u can message me on

  76. rocky

    yes i typed as it is shown in comand promt
    on begining it got seprated but dan in few second again it started showing shortcuts
    many tyms i tried but no use

  77. rocky

    hello kapil sir can u please tell me wat i shud do next??

  78. ^^ I suggest you to format your USB and plug it to another system, put some content in it and then check if the issue persists. If the issue resolves, consider to Refresh your Windows 8 installation.

  79. Maurice Bremer

    Do you even know what you are talking about?

  80. Sagar YADAV

    Hi, i am having the same problem but when when i put this attrib -h -r -s /s h:*.* on Command Prompt it says page not found can you please help me out ASAP. thank you.

  81. Luqman Al Hakim

    this 1 finally work. thx

  82. France

    i tried it on cmd but it said there, “Invalid switch”, dont know why. pls help me

  83. Anam Rasool

    hi Kapil…… em facing the same problem…..but em lil bit confused about the solution given…. plz help me out….. ??????

  84. ayan

    u just saved ma wedding memory… thanx alot dear
    God bless u…

  85. ^^ Glad we could help 🙂

  86. Talitha Fernandes

    This didn’t work for me. My files were still hidden.
    So I tried this:- Uncheck the hidden box for each file (in the file properties) and make sure you apply the changes for folders and subfolders. Then just delete the shortcuts.
    Although this wouldn’t be preferred by someone who has many files in their USB.
    Hope this helped!

  87. Yandere Ren

    it says path not found, what do I do?

  88. anup

    thnx dude … it was really helpfull … thanx once again

  89. Rohit

    I have transferred my file short cuts from pen drive to C: drive and formatted the pen drive. this command is not working for me. Is there any other way I can get my original data, please help. Its all my work file.

  90. Sammy Sparks Kea

    Create a new folder and give a name to it…what ever you wish! and move the necessary documents/files into that new folder.

    This is just simple since you’ve already removed the shortcut virus!!

  91. Amit Yadav

    What should I do if my laptop contains a virus that keeps creating undelete able folders in it’s hard disk
    Please help me

  92. just walking by

    hi meena

  93. Albert

    @Meena Bassem, its working now.. thanks for this instructions. @Kapil Arya thanks for posting this thread it helps alot..

  94. heyyyy!!

    umm.. i came to this site to see if i could recover any info. but when i plugged in my usb my avast automatically scan it and it said threat detected i read the file name and it just said E my usb letter. i scanned my usb manually and it found some more so i pressed fix automatically and it moved it to the virus chest. i opened the usb and it was empty even though my laptop was telling me that it’s half full so i reported the virus as a false positive and checked my usb and everything was back to normal. just needed to copy everything to laptop and format… kinda weird but acceptable

  95. md

    thanks it really helped me :*

  96. Knite

    Is there a way to fix the PC that is making this?

  97. Ian Capoquian

    Maybe the computer you used or laptop is the one infected by the virus… try installing anti virus softwares and scan the whole computer then remove the virus… after that, scan also the device full scan the device then remove the virus… this method solved my problem… Oh by the way, thank you Kapil Arya for posting this even if it’s a little bit old… :]

  98. Mahmoud Zaghlool

    I get an error.
    check image link:

  99. John Christopher Nuqui

    at attrib, why does it say “parameter format not correct”

  100. Michael G

    Thank you it works perfectly (although I used the .bat from Meena Bassem from the updated comments)

  101. sachu

    when our mobile while connecting to PC, in mobile it will show 2 more options to choose.

    there having 1- AS USB STARAGE(transfer ur file between computer & mobile)

    2- Media Device(MTP)
    ur mobile connected as USB device., please change this to MEDIA DEVICE, Now in ur My computer will show Phone name. click & open, ur problems solved.
    but if u will choose USB that problems still will be there

  102. meghana

    you donkey because of you i lost my folders

  103. ass

    how to make a hidden folder

  104. Femby Turangan

    Hey there, this happened to my phone, and so I’m afraid of losing some data (especially of my phone’s system). And now they’re all inside system volume information while they’re still in shortcut condition. Can any of you give me some advice??

  105. Visualizer Plus

    folks try this amazing program that will unhide all your files and folders with a click of a button!

    get Visualizer Plus at:

    good luck!

  106. rajneesh tiwari

    I’m using widows 8 i have same probe wid my pendrive n I format it unfortunately and its not working. Plzz help me to solve it.

  107. Issa A. O

    Thanks Kapil i was getting worried until i found this post. It was really helpful. cheers!!!

  108. OZAN butt

    Freaking DOPEs it would be more easier if u would go in to the usb folder and type *** in the search bar u would have all the contents of the USB displayed

  109. Anthony

    It did not work I used it for my phone and a file Microsoft excel .wsf and system volume information keep showing even when I type the code you gave . And after deleting they come back as shortcuts

  110. Anthony

    The code you gave works . but after some second as visible folders they go back as hidden files

  111. Angela Dy Vega

    Kapil Arya, Since these shortcuts aren’t viruses does it mean it wont make any harm to my computer…
    my problem is, whenver i insert my usb to other computer it doesnt turn into shortcut, only when I insert the usb in my computer again, does it become a virus.. So seems to be the problem here.. Is it the USB or my computer

  112. ^^ I suggest you to scan your computer once, using whatever security suite you’re using. Additionally try the suggestions mentioned in article itself.

  113. Blakk

    hi i keeping getting “Access denied -H:system volume information”

  114. Angela Dy Vega

    okay .. thanks..

  115. Raven_Soul

    And that Computer will get Infected ^^

  116. Raven_Soul

    I can Delete them I can Format them but when Im Copying my files back and replugin the USB the Shortcut its still there Im getting Irritated

  117. Abdul Rakeeb

    Mr.Kapil , Unfortunately there is a virus in my Usb .. when I connect it in Pc se. Removable disk folder will open but there is an other folder of removable disk with shortcut then when we open that shortcut folder It doesn’t open !.. Solution?

  118. Get the USB scanned by your antivirus on another system first.

  119. Marky

    i dont have the system restore point on my lenovo laptop

  120. Mohamad El Ali

    Thanks that was ausome you saved my life the photos was the only copy of my sister weding

  121. Abdul Rakeeb

    Thank you Sir !

  122. S???ñt ?????r Jordan

    Thanks its working

  123. Samson

    Thanks man. This really helps. So furious about loosing all my files earlier?

  124. Jedidia Monasterial

    thanks for this help. i think that i fix the problem with your solution. but i still wandering if this problem will be back again other time

  125. JPShark

    i dont get the steps 2 to 4? plz explain

Leave a Reply

Your email address will not be published. Required fields are marked *

4 + 5 =