Find total number of file to be recovered

Using PhotoRec to recover lost data
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
codekingmaker
Posts: 5
Joined: 24 Apr 2013, 13:49

Find total number of file to be recovered

#1 Post by codekingmaker »

Hello All,

I need to find total number of file to be recovered from an USB drive. I am trying to get standard output method but it's not working. It throws an error, "The requested operation requires elevation".


ProcessStartInfo objStartInfo = new ProcessStartInfo("Photo_Rec.exe");
objStartInfo.Arguments = "/d D:\\ProgramFile\\Recover\\recagent /cmd usb options,mode_ext2,fileopt,everything,disable,jpg,enable,png,enable,bmp,enable,gif,enable,doc,enable,pdf,enable,txt,enable,mp3,enable,mov,enable,freespace,search";
try
{
Process objRecoverProcess = new Process();
objStartInfo.RedirectStandardError = true;
objStartInfo.RedirectStandardOutput = true;
objStartInfo.UseShellExecute = false;
objRecoverProcess = Process.Start(objStartInfo);
StreamReader adbOutput = objRecoverProcess.StandardOutput;
objRecoverProcess.WaitForExit();
}
catch
{
}

I have used the above code.

Anybody let me know the mistake in this code?

Thanks,

Damu

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Find total number of file to be recovered

#2 Post by cgrenier »

Run "photorec_win.exe /log", photorec.log file is generated, it will contain the number of file recovered.

Locked