#91028 - 2003-01-14 11:27 PM
Copy GUI UDF Problem?
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
I am running the following...It works great on a Windows XP Pro pc but errors out on a Windows 2000 Pro pc.
code:
IF EXIST ("D:\Build\*.*") GUICopy("D:\Build\Temp", "%systemdrive%", 528) GUICopy("D:\Build\SP3", "%systemdrive%", 528) ENDIF
function GUICopy($Source, $Destination, $Flags) $objShell=CreateObject("Shell.Application") $objFolder=$objShell.NameSpace($Destination) $objFolder.CopyHere($Source, $Flags) $objShell=0 endfunction
I get an error that says...
Script error: expected expression! $objFolder.CopyHere($Source, $Flags)
|
Top
|
|
|
|
#91029 - 2003-01-14 11:31 PM
Re: Copy GUI UDF Problem?
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
Nevermind...Just me being stupid again...
|
Top
|
|
|
|
#91030 - 2003-01-14 11:32 PM
Re: Copy GUI UDF Problem?
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
Forgot to add the "\" after %systemdrive%. I guess XP was just smart enough to figure it out.
code:
IF EXIST ("D:\Build\*.*") GUICopy("D:\Build\Temp", "%systemdrive%\", 528) GUICopy("D:\Build\SP3", "%systemdrive%\", 528) ENDIF
function GUICopy($Source, $Destination, $Flags) $objShell=CreateObject("Shell.Application") $objFolder=$objShell.NameSpace($Destination) $objFolder.CopyHere($Source, $Flags) $objShell=0 endfunction
|
Top
|
|
|
|
#91033 - 2003-01-15 03:30 AM
Re: Copy GUI UDF Problem?
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
If you'd have left my error checking lines in there it would have told you the problem.
|
Top
|
|
|
|
#91037 - 2003-01-16 12:48 AM
Re: Copy GUI UDF Problem?
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
have everyone write their UDFs, then have them golfed... after that no one can understand them and they will be left alone...
|
Top
|
|
|
|
#91039 - 2003-01-15 01:36 PM
Re: Copy GUI UDF Problem?
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
and I don't mess around inside your UDFs...
of course, I can't tell what they'd be used for either
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
2 registered
(morganw, mole)
and 414 anonymous users online.
|
|
|