Oh, no….so you plugged your USB flash drive into a computer and tried to open the files inside, only to find all the files became shortcuts, leaving all your data inaccessible?
You might be wondering — what’s wrong? Is there a way to open the shortcut files?
Well, the answer is: it’s very likely that your USB has been infected with viruses or malware. But don’t worry! You can fix the problem in a few steps, and restore the hidden files or folders.
Just follow the step-by-step guide, and you should be all set.
Contents
The Culprit: Virus or Malware
More precisely, it can be a virus, trojan, or worm, e.g. the notorious ones like BUOUFO, QWERT, AUTORUN, etc. Chances are the virus has sneaked into either your PC or the USB drive.
What the virus often does is hide your files and folders by turning them into shortcuts – usually a few kilobytes (KBs) in size, while the actual file size is several megabytes (MBs) or gigabytes (GBs).
In rare cases, your items could be deleted by the virus and thus disappear, unfortunately. But most of the time, it’s often a quick fix.
Keep reading for the solution!
What You Need to Prepare
- A Windows PC.
- The infected USB drive.
- An antivirus program or malware removal software.
- A data recovery software.
How to Recover and Open Shortcut Files in USB
Step 1: Check If Your Files Are Hidden
First, open the Command Prompt app. For Windows 11/10/8.1, search “cmd” in the taskbar and click the best match (see the screenshot).

Next, copy this command attrib -h -r -s /s /d f:*.* with Control + C, right-click and select to paste it.

Important: here we assume your USB drive shows as F: under My Computer or This PC. Don’t forget to replace “f” if the drive letter is different.
Now, press the “Enter” key and check if the files and folders on your disk are now visible.
If yes, great. If not, go to Step 2.
Step 2: Scan And Remove Malicious Threats
- Launch your security software for a scan. We recommend Bitdefender Antivirus Plus because it’s one of the most powerful antivirus solutions on the market.
- Open the program and run a thorough scan of your PC hard drive, as well as your external disk.
- After the scan, remove any malicious threats your security software might find.
Now check the items on your device, and see if the shortcut is now gone. If yes, that’s great. Otherwise, the virus/malware may have deleted your files. Go to Step 3.
Step 3: Recover Data and Format The Disk Drive
First, get a Windows data recovery software and install the program on your PC. Connect your USB drive and then launch the recovery program to scan the disk drive your USB represents.
Once the scan is complete, navigate through the found list to see if your lost files are there. If yes, recover them as per instructions.
Next, re-format your USB on your PC (use Windows internal “quick format” or “complete format” option), this guide has more.
This way, your USB drive will be wiped out, and the virus and shortcut issues will be fixed accordingly as well.
It’s not over yet! Now you can re-use the data recovery software above to re-scan your device just in case more files can be found and recovered.
Final Tips
Normal disk re-formatting won’t erase the data saved in a storage device right away, learn the reasons why from this post we wrote.
Also, a third-party file recovery program is safe to use as it performs read-only operations and thus won’t write additional data to your disk.
That wraps up this article. I hope the step-step-step guide has helped you remove the annoying file shortcut issue. Let us know if you have any questions during the process. Leave a comment below.
June Sy
Hi! Currently experiencing this issue –> previously transferred files, but on the next boot, files are now in shortcuts except for the recently transferred folder. Tried 2 CMD tricks but then all those files disappeared except for the recently transferred folder ( the attr one —> ACCESS DENIED and also Del*Ink)
Please help me. Can i still recover my files even though they have disappeared? I’m really distressed by this as my files hold sentimental value for me.
g. harish
Thank u so much
Kiran
Method 1 worked for me
Thank you very much
moataz
excuse me i have the same issue but when i click on files it opens in a new window what i mean is that it’s accessible
Marian
Oh wow thanks, though it did not work as said access denied recycle bin, but after I ran the virus scan all back to normal, so relieved!
Yundra
Wow thx girl! ?
It really helped me!
Chuks Onu
thanks method 1 worked perfect so happy
simcha
amazing genius idea!!
Mika
Thank you so much the first method worked very well!! now i don’t need to travel two hours just to get the data back 🙂
Pawan
Well Sir,
CMD is not working in my laptop. I have windows 8.1 os.Please help!!
aj
Hi. I hope you can help me with this script. It keeps on creating shortcuts of files in my flashdrive. After I scanned the drive it deletes the virus. But it keeps on creating shortcuts whenever I save new file to the flash drive. A batch file containing the script below is also added to the flash drive.
cd Files\851\
set “a=wscript”
%comspec% /c start %a% bugfg.js
exit
Neri
It really works! Thank you so much!
Sibusiso
wow it worked thanks
SUMIT KUMAR GUPTA
Thanks a lot, It saved my time and data. Again thanks for this post
Tonny
I faced the same problem. But when I switched to Kali Linux all my files and folders were intact and very very readable.
seems the Malware or virus was meant for windows platforms.
But, thanks it worked for me.
Jibrill
the first step worked for me…thanks
Mariamawit
Thank you ? thank you ? thank you. I was about to cry ? but with your help I got my files back.
Earnest
Am getting access denied from my cmd when i try to use the attrib -h -r -s /s /d f:*.*.
Sanju Dabas
Hii my all pics from computer suddenly went to shortcut I don’t know how this happened… Bt these are my memories of last 10 years…… Plzzzzzz plzzzzzzzzzzzzzzzzzzzzz help me to get them again how can I repair them
Hamza
Hey there..!
Recently a thing happened to my external hard drive, my shitty laptop had virus and it also transmitted to my Hard drive as well (thats what i believe) and to clean it i scanned it form my Computer using Avast and after that all of my main folders became shortcuts and when i try to open them they won’t. but when i try to search a sub_folder from search option from inside the Hard drive with . (dot) entension it show everything which i know or remember, but its almost 500Gbs full and i dont remember the sub folders of every main folder except for few.
i shall be very thank full if anyone can help me out through this.
sonam
my pc homescreen get empty all the apps documents are showing in files but every time im trying to create shortcut its not showing in windows homescreen. what to do?
kadri
it work out, thanks
Isaac
my files in the usb are perfectly fine, just lately im getting 3 extra fake shortcuts to “my music” “my videos” and “my downloads”. it doesn’t open and i cant delete them. the file location is to CMD in windows 32 folder. any solution?
rylan
I TRIED STEP 1 BUT MY VIDEOS ARE STILL SHORTCUTS (.LNK FILES)
Kwizera Philadelphie
Helo my computer Local disk D all folders well shortcuts, i tried step 2, and i replace removable f with d my infected local disk and i get my folders back. THANK YOU VERY MUCH jessica carrell you made my new year of 2018 start wonderful, step 2 works very much. wish you succcess, im very satisfied, your become important to me,i thank you again.
AnySoftwareTools
Glad that it worked out for you. Happy 2018! 😀
Hamid
Thank you so much for your help. It really did work out!
Yns
I only tried step 1 and THANK YOU ! it worked
Gladiator
I also tried Step 1 only and it worked. Thank you so much!
Bryan
Yeah it works on my usb. But when i inserted the usb back again. It creates another shortcut file. How do I remove this malware on my laptop? Help pls.
Thanks..
jz
Thanks very much..
First method worked for me
Mohit
Hi,
The above code is showing Invalid switch. May be cause the problem is in my PC not in any external drives. Can you please help me out, cause all my files, images, pdf have converted into shortcut.
AnySoftwareTools
Yes, you’re probably right. Take a look at this official guide from Microsoft, and let us know how it works? https://support.microsoft.com/en-us/help/14201/windows-show-hidden-files
aarush
my laptop is infected with .exe. virus .i installed k7 antivirus he removed all my .exe virus and my all photos also gone who was converted to .exe.now i tried with data recovery software but they recover .exe files ..
please help me.
June
Hi! Currently experiencing this issue –> transferred files, but on the next boot, files are now in shortcuts except for the recently transferred folder. Tried the CMD trick but then all those files disappeared (except for the one working folder)
Just wondering if you were able to fix your issue and how did you fix it?
Andres
Thanks for the instructions. The files/icons that changed to shortcuts are all in my desktop. I don’t know what (or if) there is an external source (USD card, external hardrive, etc…) that is corrupt. For step 1, what should I type in if the problem is on my C: drive, on my desktop specifically, should I just change the “F” to “C”?
AnySoftwareTools Team
If the issue is not on your external disk, see this tutorial instead to recover the hidden files https://www.computerhope.com/issues/ch000516.htm
Jack
i type this
attrib -h -r -s /s /d f:*.*
but its not work.. show out : access denied – F:\system volume information
what can i do now??
pls help..
Joy
I only tried Step 1 and it really worked. Thank you so much! 🙂
AnySoftwareTools
That’s great. Thanks for letting us know!
GRACY
hi . i would like to ask . the attrib-h-r-s is not working on my window 7 laptop . its said not be founded . can you please help me solve this problem . i hate it everytime i insert my pendrive all the data bcome shortcut
Hosaina
Nyce one it works well tnx alot =)