Page 1 of 1 1
Topic Options
#13968 - 2001-11-06 09:28 PM Copy problem
sljordan Offline
Fresh Scripter

Registered: 2001-11-06
Posts: 8
Loc: Houston
I am trying to copy a file from our file server to my users c:\. Most users have WinNT, however we also have Win2K, Win95, and WinME. Most of the problems I am having are with WinNT users.
This is the script I am using

IF INGROUP ("Address") > 0
Color y+/b
at (6,1) "ADDRESS BOOK UPDATE."
go f:
at (6,1) "ADDRESS BOOK UPDATE.."
SHELL "xcopy \\servername\shared$\address\pogo.pab"
"c:\address\"
at (6,1) "ADDRESS BOOK UPDATE..."
at (6,1) "ADDRESS BOOK UPDATE....."
ENDIF

This darn thing runs for some users and not for others.
Please help!!!

Top
#13969 - 2001-11-06 09:39 PM Re: Copy problem
Anonymous
Unregistered


New here but shouldn't the command all be on one line?
SHELL "xcopy \\servername\shared$\address\pogo.pab c:\address\"

I am doing something simular but with the RUN command.

Top
#13970 - 2001-11-06 10:15 PM Re: Copy problem
sljordan Offline
Fresh Scripter

Registered: 2001-11-06
Posts: 8
Loc: Houston
Sorry it is on one line. My mistake.

How are you using the run command?

[ 06 November 2001: Message edited by: sljordan ]

Top
#13971 - 2001-11-06 10:22 PM Re: Copy problem
Anonymous
Unregistered


You can use the Kix-command Copy to do this:

code:
If InGroup ("Address")
Color y+/b
At (6,1) "ADDRESS BOOK UPDATE."
;Go f:
At (6,1) "ADDRESS BOOK UPDATE.."
Copy "\\servername\shared$\address\pogo.pab" "c:\address\"
At (6,1) "ADDRESS BOOK UPDATE..."
At (6,1) "ADDRESS BOOK UPDATE....."
EndIf

You don't need the "go f:" - statement, so I commented it out. The Copy-command can now copy your file from the server to the desktop.
Also, the errorcode is not needed to check. If Ingroup = true, than the code will be executed.
[ 06 November 2001: Message edited by: MartijnL ]

[ 06 November 2001: Message edited by: MartijnL ]

[ 06 November 2001: Message edited by: MartijnL ]

Top
#13972 - 2001-11-06 10:27 PM Re: Copy problem
sljordan Offline
Fresh Scripter

Registered: 2001-11-06
Posts: 8
Loc: Houston
Tried that...didn't work either.
Now you see why I'm pulling my hair out!

Top
#13973 - 2001-11-06 10:30 PM Re: Copy problem
Anonymous
Unregistered


Does the file exist?
Does the user has enough rights to the file?
Are there any error messages appearing?
Can you post the whole code, maybe then we can see what's getting wrong.

Top
#13974 - 2001-11-06 10:31 PM Re: Copy problem
Anonymous
Unregistered


What exactly does not work?
Top
#13975 - 2001-11-06 10:35 PM Re: Copy problem
sljordan Offline
Fresh Scripter

Registered: 2001-11-06
Posts: 8
Loc: Houston
The file exists.
The users have "read" rights.

The entire script is extremely long so to isolate the problem I cut it down to just drawing the box and the copy part. I am running it off a directory in my C:

What does not work is the pogo.pab file will not copy to c:\address.

[ 06 November 2001: Message edited by: sljordan ]

Top
#13976 - 2001-11-06 10:43 PM Re: Copy problem
Anonymous
Unregistered


Mmmmm.....difficult....

Does the address-dir exist on c:\?
Try to run it in debugging mode (kix32.exe /d script.kix), maybe you can see if an errormessage is coming up.

Top
#13977 - 2001-11-06 10:51 PM Re: Copy problem
sljordan Offline
Fresh Scripter

Registered: 2001-11-06
Posts: 8
Loc: Houston
there is an error message
Script error : pt !.cri

I can't read anymore..

Top
#13978 - 2001-11-06 10:56 PM Re: Copy problem
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
run your script through MCA's script debugger!

where is a link..... AHHH here

KixStrip363 for Kix3.63

KixStrip400 for Kix4.0

Bryce

Top
#13979 - 2001-11-06 11:53 PM Re: Copy problem
sljordan Offline
Fresh Scripter

Registered: 2001-11-06
Posts: 8
Loc: Houston
This is what happened when I ran Kixstrip363.
I have no idea what this means!

input 100 kixtart.scr

output 100 /block_check (skip :0 blocks: 0 labels: 0>

block_check -ERROR- block_errors=2
block_structures=4 labels=0
tab=6 ,default.

Warning KIXSTRIP: 2 errors in block structure(s). missing statement.

- do:until [0:0]
-ERROR- - for|each:in|to:step|next [0|0:0|2:0|0] <kix4.00>
-if:else:endif [4:0:4]
-select:case:endselect [0:0:0]
-while:loop [0:0]
4 block_structures found.

Informative Kixstrip: no UDF's found
Warning KIXSTRIP: 2 lines are incompleted.

Top
#13980 - 2001-11-07 12:02 AM Re: Copy problem
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Try kixref.exe, run it like this:

kixref script.kix script.out

then notepad script.out ...

In there you'll see line numbers, and next to that - a "level" number that shows you how "deep" you are within your nested IF's and WHILE's. Look for breaks in the sequence ...

-Shawn

Top
#13981 - 2001-11-07 05:44 AM Re: Copy problem
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Can you put your script on the board. It isn't very long.
It is possible that some comment isn't started with a ; symbol.
See your script and search for both TO statements.

The kixstrip information tells me:
- script 100 lines long
- 2 blockstructure errors found
- no labels used
- no UDF's used
- using 4 IF/ENDIF blockstructures

Your code can be:

code:

IF (Ingroup("Address") <> 0)
IF (Exist("c:\address") = 0) ; -directory doesn't exist-
MD "c:\address"
ENDIF
IF (SetFileAttr("c:\address\pogo.pab",32) <> 0) ; -remove readonly attribute-
? "Warning KIX: @error (@serror)"
ENDIF
COPY "\\servername\shared$\address\pogo.pab" "c:\address\." /H
ENDIF


to bypass the ReadOnly status of that PAB file.

greetings.

btw: symbol on our homepage has been linked to related http://kixtart.org topic.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#13982 - 2001-11-07 03:04 PM Re: Copy problem
Anonymous
Unregistered


I'm not well versed on the use of the debuggers but when you mentioned it works for some users and not for others my thought is that it's not a script issue unless it's consistantly happening to those users and another part of the script is at fault. If you strip the script down to the area in question does it then run on the stations where it failed? Since this is a called DOS program (xcopy) does it work if you sit at the workstation and manually type int the commans as in the script? Why are you going to the F: drive before running the xcopy? Are the workstations able to path to xcopy? As mentioned earlier what are the rights to the files? Is that an open file on the workstations that fail? Maybe stupid Q's but most of my probs have a stupid answer...

Here's what I run for laptop backups:

Go C:
RUN "XCOPY C:\MyDocu~1\*.* U:\Backup\*.* /i /e /r /y /k /h /q"

Top
#13983 - 2001-11-07 03:25 PM Re: Copy problem
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
hey guys!

thanks for all of the help

He contacted me offline and it turned out it was an old vervion of kix, 3.21 i think .

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
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.07 seconds in which 0.031 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