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 ?