2

I lost heaps of important data, plus failed backups etc. I did some recoveries but laptop drive had other plans, pushed data out of valid files + some recovery files had mismatched names or recovered files full of zeros (wiped data).

Because there’s been so many files & many have SHA56 hash names, accidentally recovered the same thing on occasion instead of what I need.

I’ve been running a command on files I’ve reviewed & don’t need to add “DELETE DONT RECOVER” to end of file name (or “EMPTY” if full of zeros) so I don’t recover it again.

I want to add the current file size in case the tool mismatches again as (unless it’s a photo) can’t confirm before physical recovery. Or will the tool just present the original file size & mismatch after the review?

Current command used.

for /R %a in ({asterisk}.*) do ren "%~a" "%~na DELETE DONT RECOVER%~xa"

I'm happy to run a separate command for file size, just needs to be accurate.

2
  • 1
    Keep in mind, a file can have 2 different sizes. Expected filesize, and size on disk. the expected filesize is written in the MBR in addition to where on the harddisk the file is stored, but the actual filesize is based on which data is actually present on the disk. If you use the expected filesize for a file that has 0 bytes on disk, it may create a file with garbage in it.
    – LPChip
    Commented Jun 20 at 7:05
  • @LPChip sorry, thats not relevant. I’m doing it purely so once I’ve decided i dont beed the file and remove it, when i do recoveries again i can do a quick spot check and make sure that the files i marked as not needing to be recovered are not suddenly larger and posdibly holding data of items I actually need. Commented Jun 20 at 17:57

1 Answer 1

1

I want to add the current file size

Use %~z1 (Display the file size)

Example:

for /R %a in ({asterisk}.*) do ren "%~a" "%~na DELETE DONT RECOVER% - size %~za%~xa"
                                                                   ^^^^^^^^^^^^^

Further Reading

2
  • thank you! thats perfect! Commented Jun 20 at 13:32
  • my command is suddenly only recursing in a single file and the command is no different from yesterday? any ideas Commented Jun 22 at 9:16

You must log in to answer this question.

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