#98558 - 2003-02-19 03:02 AM
A Little help on Permissions
|
Wazza
Fresh Scripter
Registered: 2003-02-19
Posts: 6
|
New to Kixtart so bare with me please if this is a basic problem.
Using Kixtart 4.12: When copying a file from a server to a client where the file already exists on the client - the script terminates. I want the script to overwrite the file and am using the basic copy statement with no joy. Works fine when I try on my client but not on any of the other clients. I can't get the script to delete or move a file on a client either?
code:
$FileName='<test.doc>' $SrcPath='\\<server>\<folder>\' $DestPath='C:\Program Files\<folder>\' $DestFile=$DestPath+'\'+$FileName $SrcFile=$SrcPath+'\'+$FileName if comparefiletimes($DestFile,$SrcFile)<0 or 1-exist($DestFile) copy $SrcFile $DestPath endif
|
Top
|
|
|
|
#98561 - 2003-02-19 03:16 AM
Re: A Little help on Permissions
|
Wazza
Fresh Scripter
Registered: 2003-02-19
Posts: 6
|
Thanks for the quick replies. I am guessing this is a permissions or rights issue however do not have enough experience to make the call. The odd thing is that the user DOES have permission <full control> on this file through windows - its only when executing the login script that there seems to be a permission issue
|
Top
|
|
|
|
#98564 - 2003-02-19 03:45 AM
Re: A Little help on Permissions
|
Wazza
Fresh Scripter
Registered: 2003-02-19
Posts: 6
|
@serror get $keypress returns a quote: access is denied
error. however, I again confirm the user has full rights to this file...
|
Top
|
|
|
|
#98566 - 2003-02-19 03:52 AM
Re: A Little help on Permissions
|
Wazza
Fresh Scripter
Registered: 2003-02-19
Posts: 6
|
user has rights to source and destination. Also, no the file is not in use. The problem seems to be only occuring when writing to anywhere in c:\program files\
|
Top
|
|
|
|
#98567 - 2003-02-19 03:58 AM
Re: A Little help on Permissions
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
since you have spaces in the destination path, did you try adding double quotes to the begining and end of the destination path? [ 19. February 2003, 03:59: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#98568 - 2003-02-19 04:00 AM
Re: A Little help on Permissions
|
Wazza
Fresh Scripter
Registered: 2003-02-19
Posts: 6
|
yes, I have tried using double quotes the paths involved.
|
Top
|
|
|
|
#98569 - 2003-02-19 04:04 AM
Re: A Little help on Permissions
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
open a DOS window and execute the DOS copy command using the values in your KiXtart program. what happens?
|
Top
|
|
|
|
#98570 - 2003-02-19 04:08 AM
Re: A Little help on Permissions
|
Wazza
Fresh Scripter
Registered: 2003-02-19
Posts: 6
|
works perfectly in DOS - tried that this morning
|
Top
|
|
|
|
#98571 - 2003-02-19 02:18 PM
Re: A Little help on Permissions
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Print the line you are executing to verify that it is attempting what you expect.
code:
? 'copy $SrcFile $DestPath' Get $
when the script stops with theis on the screen compare it to the DOS command that worked. Is it the same?
Copy it and try it in another DOS window. [ 19. February 2003, 14:19: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 202 anonymous users online.
|
|
|