theology
asked on
VB Script create folder and copy data
Hi
I need to check via vb script that if folder exist do nothing if folder dose not exist create a folder and then copy all data from 9.4 folder to 9.4_AA
I am getting error on copyfolder
please suggest.
Set fso = CreateObject ("scripting.filesystemobje ct")
If Not fso.FolderExists( "D:\TAF\9.4_AA") Then
Set objFolder = fso.CreateFolder( "D:\TAF\9.4.2_AA")
End If
Set fso = CreateObject ("scripting.filesystemobje ct")
Set fso.copyfolder("D:\TAF\9.4 ","D:\HSCT AF\9.4_AA\ ")
I need to check via vb script that if folder exist do nothing if folder dose not exist create a folder and then copy all data from 9.4 folder to 9.4_AA
I am getting error on copyfolder
please suggest.
Set fso = CreateObject ("scripting.filesystemobje
If Not fso.FolderExists( "D:\TAF\9.4_AA") Then
Set objFolder = fso.CreateFolder( "D:\TAF\9.4.2_AA")
End If
Set fso = CreateObject ("scripting.filesystemobje
Set fso.copyfolder("D:\TAF\9.4
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
why did you create FSO two times?
Shouldnt it be more like
Open in new window
And are you sure that the destination folder isD:\HSCTAF\9.4_AA\
?
HTH
Rainer