0

Say I have 100 image files, all different names, I batch rename them 1-100.jpg, I then change the extension of all the files to .txt. I then make 100 blank text files and over write the converted image files.

I then split the 100 blank txt files and split them 50/50, renaming them both the same and over writing, then split to 25/25, rename and over write, till I get just one file. Then I just delete this file.

Would this make the original img files or file names, hashes etc recoverable?

  • Can you please rephrase the second paragraph? It is unclear. – MiaoHatola Apr 1 '17 at 7:40
  • What is your storage medium? SSD or HDD? It makes a large difference. Short answer is it is more complex then you think try reviewing some of the products that specialize in this e.g. howtogeek.com/72130/… – David Waters Apr 1 '17 at 7:49
  • @DavidWaters, its both, but my C drive is SSD – Aasim Azam Apr 1 '17 at 14:57
  • due to wear-leveling, you need to keep an SSD filled if you want to be able to over-write particular spots with any reliability, otherwise you have no idea when/if your "empty" space is physically over-written. TBH, it's not 100%, since some space can be "reserved" for later errors, but it's the best one can reasonably do. – dandavis Apr 2 '17 at 18:54
5

Different filesystems for different operating systems work differently. But no matter which filesystem you use, this is unlikely to overwrite the data.

One thing you need to understand about filesystems is that the friendly directory- and filenames are usually an abstraction for the human user. On the actual hardware, all the file data is one big lump of one's and zero's. In order to find a file, there is a file table which maps human-readable file paths to hard drive locations and lengths.

I batch rename them 1-100.jpg, I then change the extension of all the files to .txt.

This will change their names in the file table, but not change any of the data.

I then make 100 blank text files and over write the converted image files.

This will truncate the length of all the files in the file table to 0 bytes. There is no reason for the filesystem to overwrite the actual data. You will likely end up with lots of space marked as empty, but which still contains the image data until the filesystem needs the space for new files.

I then split the 100 blank txt files and split them 50/50, renaming them both the same and over writing, then split to 25/25, rename and over write, till I get just one file. Then I just delete this file.

I am not really sure what you mean with that, but it sounds like something which would again just affect the file table entries but none of the actual data.

If you want the filesystem to actually overwrite the data and not just the filename, you usually need to replace the content of the file with new content of the same length and then save it under the same name. So the manual way to shred a file would be to open it with a text editor and replace the content with the same number of random keystrokes (you can use copy&paste if you like). This is of course very tedious, so you might want to use one of the many file shredding programs which are available for free.

Also be aware of the special intricacies of shredding files on solid-state-drives. Their wear leveling algorithms create another layer of indirection below the filesystem which the operating system is not aware of and might result in data not actually being overwritten on the hardware even when the filesystem tells the hardware to do exactly that.

  • Would a shredder destroy an image hash too? – Aasim Azam Apr 7 '17 at 22:08
  • @AasimAzam What "image hash" are you talking about? – Philipp Apr 7 '17 at 23:20
  • I might be understanding this incorrectly, but an if there are two images that are similar but one is compressed, they both have the same hash. So would a shredded file have any remnants of its original self that even if the image is not recoverable or viewable, it can be hashed and matched with existing photos? – Aasim Azam Apr 8 '17 at 14:41
  • 1
    @AasimAzam you seem to incorrectly understand a couple of things. A "hash" is a value which can be calculated from a string of data and is a kind of "fingerprint" of that data. Most hashing algorithms yield a different hash value when just one bit is different, so a compressed image and the original would have a completely different hash value. But there are also hash algorithms especially for images which give the same or a similar hash even when an image is scaled or cropped. But when there is no data at all because the file was zeroed out, there is nothing to calculate a hash value from. – Philipp Apr 8 '17 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.