Choose partition in scripting mode

How to use TestDisk to recover lost partition
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
Post Reply
Posts: 1
Joined: 28 Jul 2020, 23:59

Choose partition in scripting mode

#1 Post by afuna »

I'm trying to script testdisk to see which partitions contain an "accessible" filesystem.
Let's say I want to execute "list" on partition 3, I try

testdisk /cmd image.dsk analyze,3,list

but get an syntax error. The documentation says that the "analyze" menu has a "number" command, but I'm not sure what that means/how to use it.


Sponsored links

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

Re: Choose partition in scripting mode

#2 Post by cgrenier »

Try something like

Code: Select all

testdisk /log /cmd image.dsk advanced,3,list

Post Reply