Page 1 of 1 1
Topic Options
#125584 - 2004-08-25 06:12 AM Copy w/ variables in SOURCE and DESTINATION
Anonymous
Unregistered


I am trying to copy a shortcut from a share on the server to every users DESKTOP. To do this I need to put variables into the SOURCE and DEST parameters of the COPY command.
$PatchLoc="SYDFILESVR\MIS\SUPP\"
$ProfileLoc=%USERPROFILE%
Copy $PatchLoc + "PSL\Helpdesk DB" $ProfileLoc + "\Desktop"
KIX does not copy. Help please...

Top
#125585 - 2004-08-25 06:33 AM Re: Copy w/ variables in SOURCE and DESTINATION
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Lots of mistakes...
Assuming that this is supposed to be a UNC path, you are missing the hacks.
$PatchLoc="\\SYDFILESVR\MIS\SUPP\"

You should pull this path from the registry with ReadValue().
$ProfileLoc=%USERPROFILE%

You dan't say waht is a file or a folder. Folders should have a trailing hack.
Copy $PatchLoc + "PSL\Helpdesk DB\" $ProfileLoc + "\Desktop\"
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125586 - 2004-08-25 07:00 AM Re: Copy w/ variables in SOURCE and DESTINATION
Anonymous
Unregistered


Thanks, hacks were missing.
"Helpdesk DB" is actually the file name (no extension). Line now looks like this:
Copy "\\" + $PatchLoc + "PSL\Helpdesk DB" $ProfileLoc + "\Desktop\Helpdesk DB"
still does not work...

Top
#125587 - 2004-08-25 07:33 AM Re: Copy w/ variables in SOURCE and DESTINATION
Anonymous
Unregistered


Thanks for help. I think it's a KIX limitation. Does not seem to be able to copy SHORTCUTs I tried this:
Code:
 copy "\\sydfilesvr\mis\SUPP\psl\Helpdesk DB" "C:\Documents and Settings\olafr\Desktop\" 

and it did not work. ("Helpdesk DB" is a Windows XP shortcut)
Tried this:
Code:
 copy "\\sydfilesvr\mis\SUPP\psl\Help.txt" "C:\Documents and Settings\olafr\Desktop\" 

and it did work ...
any idea's.

Top
#125588 - 2004-08-25 07:34 AM Re: Copy w/ variables in SOURCE and DESTINATION
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Without trying to run it or even really read the full post, I see a missing + sign.

Instead of COPY try removing the COPY command and run it with KIX32 in a DOS console. It should show you the path that it thinks it is.

Top
#125589 - 2004-08-25 07:35 AM Re: Copy w/ variables in SOURCE and DESTINATION
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Your missing the extension .LNK which Windows is hiding from you. Look at the name of the file in a DOS console.
Top
#125590 - 2004-08-25 07:59 AM Re: Copy w/ variables in SOURCE and DESTINATION
Anonymous
Unregistered


Thanks, that's it. Even though I had Hide extension of known file types UNticked... another MS 'feature' I guess

Thanks for all yours help

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.124 seconds in which 0.091 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org