I use the following to FTP a file. However it temporarily creates a text
file on the Desktop that contains the users password. I'm concerned about
the vbs failing sometime and leaving the file for all to see. Is there a way
I could just write it to a string, pass the string to FTP and never create
the text file anywhere?
thanks
LJB
'-----------------------------------------------------------
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")
Path = oShell.SpecialFolders("Desktop")
Order = InputBox("Order Number")
Set oScript = oFSO.CreateTextFile(Path & "\get.txt", True)
With oScript
.WriteLine "open vaxf"
.WriteLine InputBox("UserID")
.WriteLine InputBox("Password")
.WriteLine "cd RPT$DISK:[RPT.RPT_UNT]"
.WriteLine "type ascii"
.WriteLine "get " & Order & "unt.lis """ & Path & "\" & Order & ".txt"""
.WriteLine "bye"
End With
oShell.Run "ftp -s:""" & Path & "\get.txt""", 0, True
oScript.Close
oFSO.DeleteFile Path & "\get.txt", True
Set oScript = Nothing
Set oFSO = Nothing
Set oShell = Nothing