0

I am running my IDA script on many files (batching), and i need to get the file name the script is running on within the script. the problem is i cannot find any API that does that.

the closest things i found was GetIdbDir(), which doesn't include the file name, also there seems to be a get_path function in ida_loader, but it expects a c type pointer, when i gave it a python string it failed.

  • You can use get_input_file_path() IDC function and then extract the file name from it. It's also available in IDAPython as ida_nalt.get_input_file_path source. – bart1e Aug 29 at 12:33
  • @bart1e yep that worked thanks, you can post the answer so i can select it as the answer. – OneAndOnly Sep 4 at 14:50
1

You can use get_input_file_path() IDC function and then extract the file name from it.

It's also available in IDAPython as ida_nalt.get_input_file_path (source).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.