While I don't believe there is any "fool proof" way in doing things when
you are using scripting, I believe that you can double and triple check.
So, in my BWS Scripts, I use the VB FileCopy (easy enough... copy from
where to where)...
However, before closing my script, I check to be sure the file copy was
successful. For example:
FileCopy "C:\DailyFiles\" & F("FILE"), F("Target")
Then later on in the script, I check to be sure that the F("Target")
exists.
If F("Target") <> "" then
SendMail, Success
Else
SendMail, Failure
End If
So, in my check statement, if the F("Target") exists, I get an email
stating everything is peachy. If the file isn't there... I get a
message stating that the file move failed. (of course, there is more to
my send mail statement than "success" or "failure"... but you get the
idea).
Another really good way I have worked around this is that I base the
Kill file (from the local) on whether or not the move was successful.
If I don't have success in the move, then I don't kill the files.
So far, in the last 8 months, it has worked very well.
Kim Scaccia, System Admin
Recovery Reimbursement
Patient Business & Financial Services
Halifax Medical Center
386-226-4590 opt 1 ext 2018
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Parish, Jared R.
Sent: Thursday, March 13, 2008 3:51 PM
To: [email protected]
Subject: [Talk] File Copy Issues
Since I've started using scripting products, not just BWS, I've had
issues copying files to network drives. Usually my practices are to
open and use the file(s) locally on my scripting PC and then copy them
to a network location for backup purposes. I've tried using the file
system object in VBA, Windows APIs, and batch files to copy files with
little success to network drives (and UNC paths). Does anyone have any
fool proof ways of copying to network drives?
Thanks,
Jared Parish
Business Analyst
Blanchard Valley Health System
1900 South Main Street
Findlay, Ohio 45840
Voice: 419.429.6476
Fax: 419.423.5540
Email: [EMAIL PROTECTED]
CareTech Solutions, Inc.