Hi,
I currently have the following which creates a script and uploads a text file to an FTP site
The file
I currently have the following which creates a script and uploads a text file to an FTP site
Code:
Set TextFile = CreateObject("Scripting.FileSystemObject").CreateTextFile(scriptfile, True)
TextFile.writeline "user@mywebsite.co.uk" 'username
TextFile.writeline "password!" 'password
TextFile.writeline "cd GK" 'directory on FTP site
TextFile.writeline "binary"
TextFile.writeline "put " + Chr(34) + "c:\temp\IDCheck.txt" + Chr(34) 'file to be uploaded
TextFile.writeline "bye"
TextFile.Close
Code:
Set TextFile = CreateObject("Scripting.FileSystemObject").CreateTextFile(batfile, True)
TextFile.writeline "ftp -s:" + Chr(34) + scriptfile + Chr(34) + " www.mywebsite.co.uk"
TextFile.writeline "del " + Chr(34) + "c:\temp\IDCheck.txt" + Chr(34)
TextFile.writeline "del " + Chr(34) + scriptfile + Chr(34)
TextFile.writeline "del " + Chr(34) + batfile + Chr(34)
TextFile.Close
The file
is created everytime an excel spreadsheet is opened and contains a single cell value. I would like to append the contents of the text file on the FTP as currently it just gets overwritten. Is this possiblec:\temp\IDCheck.txt
Last edited: