Micro Focus QTP (UFT) Forums
How to get the path of the batch file under execution - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to get the path of the batch file under execution (/Thread-How-to-get-the-path-of-the-batch-file-under-execution)



How to get the path of the batch file under execution - sams001 - 01-23-2013

Hi All,

How to get the path of the vbs file which is under execution. For eg, if i have triggered execution of C:\abc\def\gh.vbs file, how can i get this path?

Thanks
Sams


RE: How to get the path of the batch file under execution - harishshenoy - 01-28-2013

try this
folderName = "..\.."

Code:
Set fso = CreateObject("Scripting.FileSystemObject")
File_path = fso.GetAbsolutePathName(folderName)
msgbox File_path

this 'File_path' will give you the path.

Regards,
Harish


RE: How to get the path of the batch file under execution - sams001 - 01-29-2013

Thank you Harish.