TestedOrange
6 years agoOccasional Contributor
How to run a bat file with a relative path?
Hi,
I wonder how can I run a bat file from a relative path?
Our Testsuite is located in a git repository which results in different absolute paths per user.
Our folder structure looks like:
root
root/Scripts/MyBat.bat
root/TestComplete/suite.pjs
root/TestComplete/suite/foo.mds
etc.
I'd like to run the root/Scripts/MyBat.bat out of a keyword in root/TestComplete/suite/KeywordTests/
How can I achieve this without using an absolut path to MyBat.bat ?
Thank you and kind Regards
TestedOrange
Thanks for your feedback.
I solved it by writing a routine using aqFileSystem.GetCurrentFolder() and aqFileSystem.GetFolderInfo().ParentFolder.