Logic of restoring selected files

Using TestDisk to undelete files
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
nh2me
Posts: 1
Joined: 16 Jul 2023, 15:29

Logic of restoring selected files

#1 Post by nh2me »

Hi,

I'm a programmer and currently trying to restore some accidentally deleted data from an SD card formatted with FAT32 LBA.

In the "Undelete" screen of the TestDisk 7.1 terminal application on Linux, I can see the missing directories listed in red colour as:

Code: Select all

 drwxr-xr-x     0     0         0 10-Jul-2023 10:57 FARO_LS04927_2616.fls
 drwxr-xr-x     0     0         0 10-Jul-2023 10:57 FARO_LS04927_2617.fls
If I select one or multiple of those dirs, and press "C to copy the selected files" or "c to copy the current file", it asks me into which dir to store the selected file, and proceeds with recovery.

However, it does something unexpected:

In the store directory I selected, it creates dirs named after the missing directory (e.g. "FARO_LS04927_2616.fls"), but then puts into each such named directory the entire current root-level contents of the SD card's file system.

This makes no sense to me; I would expect that either it puts restored files into those directories, or nothing, if nothing could be restored.

Am I missing something / not using TestDisk correctly?

Thanks!

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

Re: Logic of restoring selected files

#2 Post by recuperation »

Use the most recent version 7.2-WIP, this is not betaware. You do not need to compile, the package contains precompiled programs with the postfix "static". Run as admin and ensure having write rights at the target location.

If that fails provide a bug documentation on programmer level! ;)

Locked