|
|
 | | From: | Jeffrey W. Harris | | Subject: | File System Object | | Date: | Wed, 12 Jan 2005 16:58:05 -0500 |
|
|
 | Howdy,
I'm looking for a way to access the FileSystemObject so I don't have to have it is a script file as below :
Option Explicit
Dim objFSO, objFile, objWSHShell, nAnswer Dim cAIXUser, cAIXPassword, cAIXFileName
cAIXUser = LCase(InputBox("Enter Your AIX User ID : ", "User ID")) cAIXPassword = InputBox("Enter Your AIX Password : ", "Password") cAIXFileName = InputBox("Enter You AIX Teleminder File Name : ", "File Name", "TELEMIND.TXT")
if cAIXUser <> "" or cAIXPassword <> "" then
nAnswer = MsgBox ("Connecting To AIX Server, To Get Teleminder File To Process Appointments.", 33, "File Transfer (FTP)")
if nAnswer = 1 then Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.CreateTextFile("teleminderFTP.txt") Set objWSHShell = WScript.CreateObject("WScript.Shell") objFile.WriteLine "user" & " " & cAIXUser & " " & cAIXPassword objFile.WriteLine "cd /home/" & cAIXUser objFile.WriteLine "prompt" objFile.WriteLine "lcd p:\teleminder\processing" objFile.WriteLine "mget" & " " & cAIXFileName objFile.WriteLine "bye" objFile.Close objWSHShell.Run "%COMSPEC% /c ftp -n -s:teleminderFTP.txt 10.0.0.2", 10, TRUE Set objFSO = CreateObject("Scripting.FileSystemObject") if objFSO.FileExists("teleminderFTP.txt") then Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.DeleteFile("teleminderFTP.txt") end if else MsgBox "File Transfer Cancelled!", 16, "File Transfer (FTP)" end if else MsgBox "User ID And/Or Password Were Blank. Try Again!", 16, "Exit File Transfer (FTP)" end if
I know I have seen SOMETHING in the past....
Thanks Jeffrey
|
|
 | | From: | news.alldbase.com | | Subject: | Re: File System Object | | Date: | Thu, 13 Jan 2005 11:36:22 -0500 |
|
|
 | I don't see anything here that you can not use the dBASE file object. local f f = new file() f.create("teleminderFTP.txt") f.puts("user" + " " + cAIXUser + " " + cAIXPassword ) etc. f.close() run(... // you may want to use something like Jim Sares's runWait program here. or Use the WSH shell object. if f.Exists("teleminderFTP.txt") f.delete("teleminderFTP.txt") endif
-- Rich... www.autotraker.com AutoTraker Inc.
"Jeffrey W. Harris" wrote in message news:vxBVLHP%23EHA.888@news-server... > Howdy, > > I'm looking for a way to access the FileSystemObject so I don't have to > have it is a script file as below : > > Option Explicit > > Dim objFSO, objFile, objWSHShell, nAnswer > Dim cAIXUser, cAIXPassword, cAIXFileName > > cAIXUser = LCase(InputBox("Enter Your AIX User ID : ", "User ID")) > cAIXPassword = InputBox("Enter Your AIX Password : ", "Password") > cAIXFileName = InputBox("Enter You AIX Teleminder File Name : ", "File > Name", "TELEMIND.TXT") > > if cAIXUser <> "" or cAIXPassword <> "" then > > nAnswer = MsgBox ("Connecting To AIX Server, To Get Teleminder File To > Process Appointments.", 33, "File Transfer (FTP)") > > if nAnswer = 1 then > Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") > Set objFile = objFSO.CreateTextFile("teleminderFTP.txt") > Set objWSHShell = WScript.CreateObject("WScript.Shell") > > objFile.WriteLine "user" & " " & cAIXUser & " " & cAIXPassword > objFile.WriteLine "cd /home/" & cAIXUser > objFile.WriteLine "prompt" > objFile.WriteLine "lcd p:\teleminder\processing" > objFile.WriteLine "mget" & " " & cAIXFileName > objFile.WriteLine "bye" > objFile.Close > > objWSHShell.Run "%COMSPEC% /c ftp -n -s:teleminderFTP.txt 10.0.0.2", > 10, TRUE > > Set objFSO = CreateObject("Scripting.FileSystemObject") > if objFSO.FileExists("teleminderFTP.txt") then > Set objFSO = CreateObject("Scripting.FileSystemObject") > objFSO.DeleteFile("teleminderFTP.txt") > end if > else > MsgBox "File Transfer Cancelled!", 16, "File Transfer (FTP)" > end if > else > MsgBox "User ID And/Or Password Were Blank. Try Again!", 16, "Exit File > Transfer (FTP)" > end if > > I know I have seen SOMETHING in the past.... > > Thanks > Jeffrey
|
|
 | | From: | Bowen Moursund [DataTech] | | Subject: | Re: File System Object | | Date: | Wed, 12 Jan 2005 16:32:09 -0600 |
|
|
 | > I'm looking for a way to access the FileSystemObject so I don't have to have it is a script file as below :
oFSO = new oleautoclient("Scripting.FileSystemObject")
-- Bowen Moursund DataTech Consulting & Development http://www.bmmnet.us
|
|
 | | From: | Jeffrey W. Harris | | Subject: | Re: File System Object | | Date: | Wed, 12 Jan 2005 17:50:53 -0500 |
|
|
 | Thanks Bowen! I'll proceed with your code.
Jeffrey
Bowen Moursund [DataTech] Wrote:
> > I'm looking for a way to access the FileSystemObject so I don't have to > have it is a script file as below : > > oFSO = new oleautoclient("Scripting.FileSystemObject") > > -- > Bowen Moursund > DataTech > Consulting & Development > http://www.bmmnet.us >
|
|
|