Hi,
I have read through other forums regarding this error. I am receiving
it with the destination parameter.
I am trying to use a variable I have contructed with the UNC and a
users name.
I have tried with qoutes & w\o, tried with file name & w\o, with the
last backlash & w\o.
If I enter the destination are a UNC path in quotes works like a charm,
but not when I construct the destination.
Here is my code, take a look and let me know what the problem is:
'Creates folder on \\server\share\ with user's SAMaccount Name
'dim filesys, newfolder, newfolderpath
newfolderpath = "\\server\share\" & samaccount
wscript.echo newfolderpath
set filesys=CreateObject("Scripting.FileSystemObject")
Set newfolder = filesys.CreateFolder(newfolderpath)
'Copies \\server\share\%newuser%\HPAPP.DAT to folder just created
newfolderpath1 = CHr(34) & newfolderpath & "\"
wscript.echo "newfolderpath1: " & newfolderpath1
fullpath = newfolderpath1 & Chr(34) '& "HPAPP.DAT"
Wscript.echo "fullpath: " & fullpath '
' fullpath1 = fullpath & Chr(34)
' Wscript.echo "fullpath1: " & fullpath
fso.CopyFile "\\server\share\newuser%\HPAPP.DAT", fullpath
Thanks in advance - GB