Micro Focus QTP (UFT) Forums
Changing current working directory - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Changing current working directory (/Thread-Changing-current-working-directory)



Changing current working directory - vijay44 - 01-21-2010

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


RE: Changing current working directory - Saket - 01-21-2010

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