Micro Focus QTP (UFT) Forums

Full Version: Changing current working directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am using the below code tp find the current directory.

Code:
Set oShell = CreateObject("WScript.Shell")
'Set oFSO = CreateObject("Scripting.FileSystemObject")
     sCurrDir=oShell.CurrentDirectory
     msgbox sCurrDir
The message says that i am in c:\ directory.
I want to change the directory to e:\
is there any way to change the current directory.
Any help would be really appreciated.
Regards;
Vijay
Hi Vijay,
what do you mean by change the current directory? if you can explain 'what exactly you want to do' will be better for us to help.
for now what I can suggest is, Place your code or vbs file in directory 'e' Smile