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 Answers2

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

DavidPostill
  • 162,382
0
@echo off

2>nul cd /d "D:\Root\Dir" || goto :EoF 

for /f tokens^=1-4*^delims^=^  %%i in ('
     "%__AppDir__%where.exe" /t /r . "*.*"
    ')do ren "%%~m" "%%~nm [Strings] Size - %%~i%%~xm"

"my command is suddenly only recursing in a single file and the command is no different from yesterday? any ideas"

Try a recursive command to list the files in a For /F loop, and do the relevant output manipulations necessary to rename them


Some further reading:

Io-oI
  • 9,237