#42870 - 2003-07-16 04:49 AM
File Manipulation over Frame
|
Eldredgt
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
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Could you show us the code?
|
|
Top
|
|
|
|
#42872 - 2003-07-16 04:57 AM
Re: File Manipulation over Frame
|
Eldredgt
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
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Where does the error get generated?
|
|
Top
|
|
|
|
#42874 - 2003-07-16 05:03 AM
Re: File Manipulation over Frame
|
Eldredgt
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
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 ]
|
|
Top
|
|
|
|
#42876 - 2003-07-16 05:10 AM
Re: File Manipulation over Frame
|
Eldredgt
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
|
|
|
|
#42878 - 2003-07-16 05:13 AM
Re: File Manipulation over Frame
|
Eldredgt
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
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
copy "c:\cc.txt" "c\t.txt" ? "@error @serror"
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 756 anonymous users online.
|
|
|