Photorec in windows: no such file opening from another folder?

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
Message
Author
betto68
Posts: 6
Joined: 17 May 2021, 17:35

Photorec in windows: no such file opening from another folder?

#1 Post by betto68 »

Hello everyone,
I'm trying to recover files from a e01 file from command line.
From 7.1 release, if the file isn't in program directory (photorec_win.exe <file.e01 with path>), I can't open it (no such file or directory).
With old 7.0 release the command work correctly.

Another question: can the gui version (qphotorec_win.exe) open e01 file?

Thank you

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Photorec in windows: no such file opening from another folder?

#2 Post by recuperation »

betto68 wrote: 17 May 2021, 17:55 Hello everyone,
I'm trying to recover files from a e01 file from command line.
From 7.1 release, if the file isn't in program directory (photorec_win.exe <file.e01 with path>), I can't open it (no such file or directory).
With old 7.0 release the command work correctly.
I doubt that. Try 7.2 WIP anway. If your path contains space symbols you would need to use the "-symbol to delimit the path string. Right issues may play a role. Try to simplify your problem. Shorten the name of the e01-file, put the Testdisk folder content into the location where your e01-file resides so that stating a path is not needed.
Another question: can the gui version (qphotorec_win.exe) open e01 file?
No.

betto68
Posts: 6
Joined: 17 May 2021, 17:35

Re: Photorec in windows: no such file opening from another folder?

#3 Post by betto68 »

recuperation wrote: 17 May 2021, 19:16 I doubt that. Try 7.2 WIP anway. If your path contains space symbols you would need to use the "-symbol to delimit the path string. Right issues may play a role. Try to simplify your problem. Shorten the name of the e01-file, put the Testdisk folder content into the location where your e01-file resides so that stating a path is not needed.

Thank you for your reply!
I've tried to delimit path with "-symbol, but never change..
With e01 data and programs in the same directory, it work.. but I would like to keep it in different folder.. with 7.0 it was possible!
7.1 and 7.2 give same problem...

Thank you

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Photorec in windows: no such file opening from another folder?

#4 Post by recuperation »

What you describe is not sufficient to eliminate a possible error in code. A detailed error description is needed that shows the questions and answers on command line level. The way you describe nobody will take care of it.

betto68
Posts: 6
Joined: 17 May 2021, 17:35

Re: Photorec in windows: no such file opening from another folder?

#5 Post by betto68 »

recuperation wrote: 17 May 2021, 19:33 What you describe is not sufficient to eliminate a possible error in code. A detailed error description is needed that shows the questions and answers on command line level. The way you describe nobody will take care of it.
Ok: in windows 10, I have photorec in a directory named "d:\testdisk-7.2-WIP", an image file in a directory named "d:\data".
From PowerShell (as Administrator):

Code: Select all

D:\testdisk-7.2-WIP> .\photorec_win.exe D:\data\image.e01
return this error (with 7.1 or 7.2 release):

Code: Select all

Unable to open file or device D:\data\image.E01: No such file or directory
and the program exit. With 7.0 release this command work instead.

If I move image.e01 in testdisk-7.2-WIP directory, this command work:

Code: Select all

D:\testdisk-7.2-WIP> .\photorec_win.exe .\image.e01
Thank you

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Photorec in windows: no such file opening from another folder?

#6 Post by recuperation »

What does .\ stands for?
When being in the Testdisk folder wanting to call an executable just writing "photorec_win.exe" should be OK.

betto68
Posts: 6
Joined: 17 May 2021, 17:35

Re: Photorec in windows: no such file opening from another folder?

#7 Post by betto68 »

recuperation wrote: 18 May 2021, 11:07 What does .\ stands for?
When being in the Testdisk folder wanting to call an executable just writing "photorec_win.exe" should be OK.
Windows PowerShell doesn't load commands from the current location by default. ".\" is current location

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Photorec in windows: no such file opening from another folder?

#8 Post by recuperation »

Please try out if you face the same problems when using the standard shell "cmd.exe".

betto68
Posts: 6
Joined: 17 May 2021, 17:35

Re: Photorec in windows: no such file opening from another folder?

#9 Post by betto68 »

recuperation wrote: 18 May 2021, 18:34 Please try out if you face the same problems when using the standard shell "cmd.exe".
Yes: I have already tried.. it doesn't change anything.. (".\" can be omitted in this case)

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Photorec in windows: no such file opening from another folder?

#10 Post by recuperation »

What is the command, what is the error message?

Locked