Hello! I'm working at having VB dynamically create a batch file that will later be used by ftp.exe to download files. The problem is, when it writes out, it prints everything on the same line, which FTP won't/can't use.
Here's what I've been doing:
CODE
''Temp file on local pc
'strTempMessageName = "C:\Test.bat"
''File that temp file gets copied to for paging
'strDumpFileName = "\Test.bat"
''Gets a file number
'intFileNumber = FreeFile()
''Open/create the file
'FileOpen(FreeFile, strTempMessageName, OpenMode.Output) For Output Access Write As intFileNumber
''Write the commands to the .bat file
'Print(intFileNumber, "open d7vipaa.logistics.cat.com" & Chr(10))
'Print(intFileNumber, txtUserName.Text & Chr(10))
'Print(intFileNumber, txtPassword.Text & Chr(10))
'Print(intFileNumber, "get '" & txtMainframe.Text & "' " & Chr(34) & txtPC.Text & Chr(34) & Chr(10)) 'Directory
'Print(intFileNumber, "quit")
''Close the file number
'FileClose(intFileNumber)
''Dump the file to the paging que (whatever that means)
'On Error Resume Next
'FileCopy(strTempMessageName, strDumpFileName)
'On Error GoTo 0
If anyone has any idea of how to get the bat file to have all seperate lines, I'd be very grateful! Thanks again!