0

Hi ALL,

Am using the below vbs script to get the full path or absolute path, from the current directory path. The current directory path is "D:\JAMER\TestCases\Hammy\TC2_Enabled_both"

The below script is used to get the full path of the current working directory to the file ScriptingFilePath.txt for later references,

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(".")
Set objFile = objFSO.CreateTextFile(".\ScriptingFilePath.txt")
strFull = wscript.ScriptFullName
strFull = objFolder.Path
objFile.Write(strFull)

When I run the vbs script seperately by double clicking on the script icon, am getting the proper full directory path (i.e) "D:\JAMER\TestCases\Hammy\TC2_Enabled_both"

But when calling from the windows batch file(content of batch file "cscript filename.vbs), am getting only short directory format as "D:\JAMER\Tes~s\Ham~y\TC2_E~th"

But I need the full path when I run from the batch file. Can you please help ?

Thanks,

Satish

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by AndreRet
0

It seems that you already found a solution HERE. Please mark this as solved so it can be closed properly, thank you.:)

For future members with the same problem, have a look at the above link for the solution.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.