Recover Deleted Files From Drive using Batch File

Using PhotoRec to recover lost data
Post Reply
Message
Author
sur2124
Posts: 1
Joined: 23 Feb 2016, 21:15

Recover Deleted Files From Drive using Batch File

#1 Post by sur2124 » 23 Feb 2016, 21:26

Hey All,
I am a new user of PhotoRec and I'm running into a few issues writing a script to automate the recovery of deleted files from a specified drive. I am running on the latest photorec 64bit. I have written the following batch script:

Code: Select all

set Drive=%1
set Path=%2
set __COMPAT_LAYER=RunAsInvoker
photorec_win.exe /debug /d %Path% %Drive% /cmd freespace,everything,search 
I am trying to test this batch file on a flash drive. My issue is figuring out exactly what the drive name is. When I put in "E:" for the drive name, I get the error "Unable to open file or device E:: Permission denied"

I am running the batch file as administrator and I can recover deleted files when I run PhotoRec manually. In all of the examples I've seen online, they use the drive "/dev/sdb" to identify the drive. Since I am running this batch script in windows, I can't identify the drive that way.

Any assistance would be much appreciated!

Sponsored links

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests