Page 1 of 1 1
Topic Options
#42870 - 2003-07-16 04:49 AM File Manipulation over Frame
Eldredgt Offline
Fresh Scripter

Registered: 2003-07-16
Posts: 5
Hello. I'm trying to manipulate files on a server in another state over a fractional T in an Active Dir. Domain. Basic Copy, GetFileSize, If Exist, etc.. Need to just copy a small database and confirm file size. Whenever I try to connect to the server over the T using UNC path (or mapped drive), it comes back with Script Error:error in expression. This only happens over the link. I can run the same script on a local machine and it runs fine. Is there a way I can compensate for latency?
Top
#42871 - 2003-07-16 04:51 AM Re: File Manipulation over Frame
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Could you show us the code?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#42872 - 2003-07-16 04:57 AM Re: File Manipulation over Frame
Eldredgt Offline
Fresh Scripter

Registered: 2003-07-16
Posts: 5
Sure, here is a portion.
code:
If Exist (\\Server1\share\test.mdb) = 1

Writeline (1, "Copy of DB to Home Started at " + @Time + @Date + Chr(13) +Chr(10) )

Copy \\Server1\share\test.mdb \\server2\share
Writeline (1, "Copy Completed at " + @Time + @Date + Chr(13) +Chr(10) )

Writeline (1, "File Size after Copy is " + $dbsize + " " + "Bytes in size" + Chr(13) +Chr(10) )
else

Writeline (1, "Copy of DB to Home was unsuccessful. Please Check. " + @Time + @Date + Chr(13) +Chr(10) )

endif

Bullock - Added code tags

[ 16. July 2003, 05:00: Message edited by: Howard Bullock ]

Top
#42873 - 2003-07-16 05:01 AM Re: File Manipulation over Frame
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Where does the error get generated?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#42874 - 2003-07-16 05:03 AM Re: File Manipulation over Frame
Eldredgt Offline
Fresh Scripter

Registered: 2003-07-16
Posts: 5
When I run the script, it appears (quite quickly) in the DOS window.
Top
#42875 - 2003-07-16 05:08 AM Re: File Manipulation over Frame
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
What version of KiXtart are you using?

You will have to write a log file or print error checking results to the screen. You are not capturing the WriteLine() return codes in order to determine if they work or why they fail.

Open the DOS window and then execute your script at the command line to retain the output of your code.

[ 16. July 2003, 05:09: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#42876 - 2003-07-16 05:10 AM Re: File Manipulation over Frame
Eldredgt Offline
Fresh Scripter

Registered: 2003-07-16
Posts: 5
Well, I took out the write statements with the same results. Is there a way to captire error codes on the copy??
Top
#42877 - 2003-07-16 05:12 AM Re: File Manipulation over Frame
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you indeed have many errors in your expressions.
all strings that are not kixtart-keywords need to be quoted.
_________________________
!

download KiXnet

Top
#42878 - 2003-07-16 05:13 AM Re: File Manipulation over Frame
Eldredgt Offline
Fresh Scripter

Registered: 2003-07-16
Posts: 5
Oh, KiXtart V4.21, sorry.
Top
#42879 - 2003-07-16 05:14 AM Re: File Manipulation over Frame
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
copy "c:\cc.txt" "c\t.txt"
? "@error @serror"
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#42880 - 2003-07-16 05:20 AM Re: File Manipulation over Frame
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Might want to add this after those errors if for some reason you can't catch it ...

?"Hit any key to continue..." get $k

-Shawn

Top
#42881 - 2003-07-16 08:11 AM Re: File Manipulation over Frame
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
another hint :

instead of doing 'chr(13) + chr(10)' you may also use @crlf which is basically the same

[This does not solve the problem but is shorter anyway]

[ 16. July 2003, 08:13: Message edited by: Jochen ]
_________________________



Top
#42882 - 2003-07-16 03:58 PM Re: File Manipulation over Frame
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Exist(\\Server1\share\test.mdb) needs quotes, too. And you might want to put a DEBUG ON into the first line of your code for debugging purposes, this is explained in the KiXtart Manual.
_________________________
There are two types of vessels, submarines and targets.

Top
#42883 - 2003-07-16 09:30 PM Re: File Manipulation over Frame
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
quote:
all strings that are not kixtart-keywords need to be quoted.
yeah [Wink]

although...
com-properties might not be kixtart keywords, now would they? [Frown]

[ 16. July 2003, 21:32: Message edited by: Lonkero ]
_________________________
!

download KiXnet

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.115 seconds in which 0.075 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