Thank you George!
For whatever reason, I seemed to have a complete brain freeze today. I
wrote the following script and it seems to work fine.
Const conSynernetServer As String = "\\XX.X.X.XX\rejectword\
<file:///\\XX.X.X.XX\rejectword\> "
Const conSynernetNhs1 As String = "\\nhs1\Synernet\
<file:///\\nhs1\Synernet\> "
Const conSynernetNhs1Bkup As String = "\\nhs1\synernet\Synernet
<file:///\\nhs1\synernet\Synernet%20rejects%20BKUP\> rejects BKUP\"
Sub SynernetRejects()
Set xa = CreateObject("Scripting.FileSystemObject")
Set mainfolder = xa.getfolder(conSynernetServer)
Set filecollection = mainfolder.files
For Each File In filecollection
CurrFile = mainfolder & "\" & File.Name
xa.CopyFile CurrFile, conSynernetNhs1Bkup & File.Name
xa.movefile CurrFile, conSynernetNhs1 & File.Name
Next
End Sub
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of George Winterberg
Sent: Thursday, February 22, 2007 3:12 PM
To: [email protected]
Subject: RE: [Talk] Moving files via VPN
Christopher,
The FileCopy and Kill commands have worked for me. Here is a sample of the
code I use.
FileCopy f("FileName"), "W:\Archive\" & "FileName_" & Format(Now,
"yyyy_mm_dd") & ".xls"
FileCopy f("FileName") & ".log", "W:\Archive\" & "FileName_" & Format(Now,
"yyyy_mm_dd") & ".xls.log"
Kill f("FileName")
Kill f("FileName") & ".log"
George Winterberg
Systems Analyst
Saint Anthony's Health Center
[EMAIL PROTECTED]
(618) 463-5311
CONFIDENTIALITY NOTICE: This email message is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact our
system administrator at [EMAIL PROTECTED] and promptly delete this
message and its attachments from your computer system.
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Christopher White
Sent: Thursday, February 22, 2007 11:36 AM
To: [email protected]
Subject: [Talk] Moving files via VPN
Hey all,
I am having some difficulty writing, what I would think should be, a pretty
simple and straight forward V8 Procedure script.
Basically all I am trying to do is move any existing .doc files from a
vender's server (via VPN) to our file server here at the hospital. And then
delete those files from the vendor's server. The script would likely run
every 30 minutes. My issue is trying to connect to the vendor's server. I
can't seem to get BWS to connect. I can execute the windows run command and
access the folder, but I can't seem to get Boston to connect to it.
My original path is \\XX.X.X.X\rejectword <file:///\\XX.X.X.X\rejectword>
and my destination path is \\nhs1\synernet <file:///\\nhs1\synernet> .
Surely some of you guys have written scripts such as these before. If
anyone could help me out I would really appreciate it.
Thanks in advance
- PLEASE NOTE: My email address has changed to
[EMAIL PROTECTED]
********************************************************************
********************************************************************
This message is intended only for the use of the individual or entity to
which it is addressed and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any dissemination, distribution, or copying of this communication is
strictly prohibited by law. If you have received this communication in
error, please notify me immediately.
********************************************************************
********************************************************************
<<attachment: image001.jpg>>
