1

When I unhid all the hidden files and folders on my external flash drive, I accidentally deleted the entire .Trashes folder.

I searched about it online and I got the answer that this "Trashes" folder is a recycling bin for the flash drive. There's also a possibility that this folder is actually created by Android. I remember that I did plug another flash drive into an Android device and it did make a "Trashes" folder, except it was not hidden. The one I'm regarding is a "Trashes" folder that was actually hidden (I unhid it and deleted it). I don't know if this is a folder created by Android or by the flash drive.

Do you know how external flash drives manage deleted files? Do they have their own recycling bin? Would the flash drive make another Trashes folder on its own, or should I make one? I deleted a file and didn't find a Trashes folder.

1
  • 1
    "Do you know how external flash drives manage deleted files?" - they don't. Storage devices are really dumb. They don't even know what a file is. File (and trash) management is up to the OS.
    – gronostaj
    Sep 29, 2020 at 8:56

3 Answers 3

1

Not to worry, unless you've discarded some files in Trash you want to salvage. You can use the flash drive as-is, though you might lose some space to anything that is marked as trash. The system usually will recreate an empty trash bin.

If there are files in trash you want to get back, use any of the free file recovery tools, such as Recuva.

Alternatively, reformat the flash drive, ignoring and losing anything that might have been in trash.

3
  • Thanks for your answer. Is Recuva free version good? And what do you mean by I might lose some space to anything that is marked as trash?
    – NowOS
    Aug 26, 2020 at 21:22
  • Depending on the file system, files in trash may be marked for deletion, e.g. by changing a character in the filename, but are not actually removed. However, if you've salvaged what you need, just reformat the drive to free up that space. Aug 27, 2020 at 1:31
  • I unhid the hidden files using "attrib -H -R -S /S /D X:[asterisk].[asterisk]" (X=Drive letter;asterisks don't appear here, so I put it like this).
    – NowOS
    Aug 27, 2020 at 21:00
0

This appears to be the trash directory created by mac OS. It should be safe to delete, and will be re-created when necessary.

Do you know how external flash drives manage deleted files? Do they have their own recycling bin? Would the flash drive make another Trashes folder on its own, or should I make one? I deleted a file and didn't find a Trashes folder.

The flash drive doesn't manage deleted files – it doesn't even know what a file is. Whether internal or external, SATA or USB, the only thing it really knows is "sectors" – 512-byte data blocks that are numbered from 0.

All file management is handled by your operating system, whose "file system" decides which files to place in which sectors. Each file system (e.g. FAT32, APFS, NTFS) has its own way of doing that, and the drive doesn't actually need to understand any of them.

As for deleted files, that's usually the job of the OS graphical interface (the file manager app, e.g. Explorer on Windows). Each operating system has its own convention about where to place deleted files:

  • Windows will create a directory named $Recycle.Bin if it's a "fixed" disk (e.g. a portable USB HDD), but will not use a trash at all if it's a "removable" disk (e.g. USB pendrive or SD card).
  • Linux will create a directory named .Trash-### with your numeric UID.
  • macOS will create a directory named .Trashes with subdirectories for each UID inside.
  • And in many cases (e.g. when deleting files through Terminal or Command Prompt), the file is simply deleted outright without using a trash.

Because there is no standard path, the trash directory cannot be pre-created when formatting – it is not "built in" to the filesystem structures – instead it is just a regular directory, and each OS will automatically create it when necessary.

1
  • Thanks for your answer. So should it be good to still use the flash drive and delete and edit files?
    – NowOS
    Aug 26, 2020 at 21:19
0

The '.Trashes' folder is for macOS to remember that you moved files to the Trash. If you deleted the folder, it will recreate again. No worries.

When you delete something from your external drive, it isn’t actually deleted. Like your main hard disk, it is moved to the drive’s trash bin. The trash bin (“.Trashes”) is a hidden folder on your external drive, so you can’t see it when you’re browsing your files. If you delete the .Trash folder on Mac, all the deleted files will be permanently deleted. There is no way to restore those deleted files, except for the data recovery software. I would recommend iBoysoft Data Recovery. It's free for 1GB and you can preview recoverable files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .