I use this script to create the archive process, check for an existing
file.
Sub OpenFile(myFile As String, fileType As enumFileType)
On Error GoTo errh
Dim oldfile, logfile, archfolder, archfile, FileN, LDate As String
LDate = Year(Date) & "_" & Month(Date) & "_" & Day(Date)
FileN = "import_" & Hour(Now) & "_" & Minute(Now) & "_" & Second(Now) &
".dat"
oldfile = "I:\piglet.dat"
logfile = "I:\log\" & FileN
archfolder = "I:\PROD\Archive\" & LDate & "\"
archfile = archfolder & FileN
If Dir$(archfolder, vbDirectory) = vbNullString Then
MkDir archfolder
End If
Do While Len(Dir(myFile)) = 0
If Len(Dir(oldfile)) > 0 Then
Name oldfile As myFile
FileCopy myFile, logfile
FileCopy myFile, archfile
Else
Wait 10
LDate = Year(Date) & "_" & Month(Date) & "_" & Day(Date)
FileN = "import_" & Hour(Now) & "_" & Minute(Now) & "_" &
Second(Now) & ".dat"
End If
'Shell "I:\prodbat.bat", vbMinimizedNoFocus
Loop
D.Open_ myFile, fileType
Exit Sub
errh:
End Sub
Jim Mullowney | Systems Consultant | Information Services |
[EMAIL PROTECTED] | www.billingsclinic.org
Billings Clinic | 2800 Tenth Avenue North - P.O. Box 37000 | Billings
Montana 59107-7000 | (406) 657-3823 | Fax (406) 657-3771
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2008 9:59 AM
To: [email protected]
Subject: [talkbws] RE: Fw: Meditech "File not found"
I need to check that the file exist on a drive.
Thanks,
Larry C. Silver
Duke Health Technology Solutions
Patient Revenue Management Organization IT Division Duke University
Health System
4101 N Roxboro Street, Durham NC 27704
P: (919)-620-4967
F: (919)-620-5106
[EMAIL PROTECTED]
The information in this electronic mail is sensitive, protected
information intended only for the addressee(s). Any other person,
including anyone who believes she/he might have received it due to an
addressing error, is requested to notify the sender immediately by
return electronic mail, and to delete it without further reading or
retention. The information should not be forwarded or shared unless in
compliance with Duke/ PRMO policies on confidentiality and/or with the
approval of the sender.
[email protected]
10/17/2008 11:49
To
AM [email protected]
cc
Please respond to
Subject
[email protected] [talkbws] RE: Fw: Meditech "File
not found"
Greetings,
Do you need to see if the file exists on a drive?
http://www.bostonworkstation.com/customer_center/script_center/script_de
tails.aspx?id=148&cat=20
Or this a prompt / dialog on the screen?
Handling different screen conditions is something the Rules format does
really well - you can think of a Step doing some data entry w/ a Timeout
rule.
If the Timeout Rule fires - First Goto a Step that (in Magic) has an
Always Rule to send F10 (clear an bogus entry) F11 (cause the exit
prompt) - C/S would just send the Esc key
Then go to a Step that has all sorts of Rules in it:
Save?
Exit?
Warning(C/S)
Confirmation(C/S)
Other prompts that may not be cleared by F10 / F11 combo
(or ESC in C/S)
In code, this would look something like:
Do Until Rule("Anchor Screen condition)
If Rule("Save...) then
End if
If Rule ("Timeout") then 'Here I have been in the loop for
too long
If Rule("Exit...) then
End if
Or can also use
PauseLoop "condition",key to send
Stable .2
Loop
BTW thanks for having a signature - the new listserv system doesn't send
me the "source" email anymore - so if you don't have a sig / name in
Talk posts - I don't know who you are :)
Regards,
Thom
Thom C. Blackwell
Product Manager
Boston Software Systems
(866) 653-5105 ex 807
www.bossoft.com
Sign up for my weekly webinar!
LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2008 11:36
To: Talk
Subject: [talkbws] Fw: Meditech "File not found"
I'm putting code into a script to handle different error conditions and
need to a add code for "file not found" in Meditech. Any suggestions?
Thanks,
Larry C. Silver
Duke Health Technology Solutions
Patient Revenue Management Organization IT Division Duke University
Health System
4101 N Roxboro Street, Durham NC 27704
P: (919)-620-4967
F: (919)-620-5106
[EMAIL PROTECTED]
The information in this electronic mail is sensitive, protected
information intended only for the addressee(s). Any other person,
including anyone who believes she/he might have received it due to an
addressing error, is requested to notify the sender immediately by
return electronic mail, and to delete it without further reading or
retention. The information should not be forwarded or shared unless in
compliance with Duke/ PRMO policies on confidentiality and/or with the
approval of the sender.
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [EMAIL PROTECTED]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [EMAIL PROTECTED]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [EMAIL PROTECTED]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [EMAIL PROTECTED]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx