Find total number of file to be recovered

Using PhotoRec to recover lost data
Post Reply
Message
Author
codekingmaker
Posts: 5
Joined: 24 Apr 2013, 13:49

Find total number of file to be recovered

#1 Post by codekingmaker » 21 Oct 2013, 17:22

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

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 3615
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 » 26 Oct 2013, 17:14

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

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests