File folders turn into exec files

On a school iMac, I created folders which contained html, jpg, pdf files and other folders. I copied these folders to my thumb drive (the one I use all the time). When I got home, I put this thumb drive into my iMac (Yosemite OS) to finish the folder transfers. When I found the folders I was looking for, they had turned into exec files. What happened?

iMac (27-inch Mid 2011), OS X Yosemite (10.10)

Posted on Nov 11, 2014 7:54 PM

Reply
35 replies

Jul 13, 2015 4:14 PM in response to Polushenie

Polushenie wrote:


A) how to recover these files for my Mac


The easiest answer would be if you had a backup of those files. If you don't, remember, any file that you don't have a backup of, regardless of where it's stored, is a file that WILL be lost eventually. It's just a matter of when.


Kurt's right on track regarding recovering them from the drive. That may be possible, depending on what malware caused the problem. The originals may just be in a hidden folder on that drive, or they may have been encrypted to prevent you from recovering them. Which is the case, we can't say.


C) what corrupted the files

That one's easy, this was the work of Windows malware. There's malware out there that is known to replace all the files on an external drive with .lnk files. Usually, the purpose is to spread the malware (when you connect the drive to another Windows machine and open one of the files, boom... that machine is infected too), though it could also be for the purpose of ransom. Any Windows computers you have connected that drive to may be infected. Fortunately, your Mac is not susceptible to this malware.

Jul 15, 2015 10:47 AM in response to Polushenie

No, you can recover them. They're still on the flash drive, just hidden.

The first command above simply makes all files in OS X visible, including those with a hidden attribute. The 'false' command tells the OS to behave normally again and not allow you to see files and folders you aren't supposed to. Many users have found various methods to show all files in OS X, and then proceed to destroy their systems by deleting everything they don't recognize and have convinced themselves shouldn't be there.


Plug the flash drive in so it appears on the desktop. Go to the /Applications/Utilities/ folder and launch Terminal. Enter this string:


chflags nohidden *


Do not press enter yet. Put a space after the asterisk, then drag and drop the icon of the flash drive from the desktop into the Terminal window. It will fill in the path name. Now press enter. All files on the drive should now be visible and you can copy your data to your desktop or other location.

Jul 15, 2015 10:57 AM in response to Kurt Lang

Kurt Lang wrote:



chflags nohidden *


Do not press enter yet. Put a space after the asterisk, then drag and drop the icon of the flash drive from the desktop into the Terminal window. It will fill in the path name. Now press enter. All files on the drive should now be visible and you can copy your data to your desktop or other location.


Kurt, shouldn't the command be …

chflags nohidden /Volumes/[name-of-disk]/*


If you do as you describe the wildcard is before /Volumes, so won't that start at the current working directory & then fail to find the dropped file path ( /Volumes/[name-of-disk]/ )?

Jul 15, 2015 11:07 AM in response to Drew Reece

Hi Drew,


I was testing this ad nauseum before posting. What you note is what I tried in testing many times and in many variations. Most that I knew should work with that type of argument would simply return to the next prompt in Terminal as if it were correct, but nothing would change on the drive.


I finally resorted to the "simple" method of entering the drive volume by drag and drop and it worked.

Jul 15, 2015 11:21 AM in response to clintonium

Voice to whom? Apple is not here. Hi-jacking a post, for a different issue, or attempting emphasis with a “me too” post — just in case we need to be reminded again, makes us less efficient, and takes more of our time to consume and filter. It slows the real help that is needed by the owner of the original post.


As you can see, there are others that have hi-jacked this post with their own issues, and should have started a new main post.


We want you to post questions, and contribute to an ongoing post if you can add value to the solution. I would not recommend you unsubscribe to this community, just submit a new post when the time is right for you. Someone will respond with the goal of helping you in your particular solution need.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

File folders turn into exec files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.