facing problem copying files through xcopy using vbscript
- by sushant
i am using the following code. the problem is that folder location path has to be entered by user. assuming i put that path in a variable say "h", how do i call this variable in xcopy. here is the code i tried. please tell the correct syntax.
Dim WshShell, oExec,g,h
h="D:\newfolder"
g="xcopy $h D:\y\ /E"
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec(g)
i also tried "&h" but it did not work.
any help is appreciated and sorry again, i dont know how to format it.