03-19-2013, 04:53 PM
Hello there.
I have created a macro that allows me to retrieve information from a table every 30 seconds and then stores it into an Excel file.
The name of the file is just a paste from a string variable which is nothing more then the date and the time when the extraction of information occured, like this:
So it names the file and saves it to my computer. Then I want to upload it to an FTP drive, but the thing is, the name of the file is always different (every 30 seconds I create a new one). How can I make my code know which file to upload 30 seconds?
I thought something like this would work:
But I guess I'm thinking "C".
Can anybody help me?
Thanks a lot!
I have created a macro that allows me to retrieve information from a table every 30 seconds and then stores it into an Excel file.
The name of the file is just a paste from a string variable which is nothing more then the date and the time when the extraction of information occured, like this:
DateTime x; x.FromComputerTime; xs=x.ToStrFormat("{yyyy}-{MM}-{dd} {HH}.{mm}.{ss}" 50) ; out xs ;
So it names the file and saves it to my computer. Then I want to upload it to an FTP drive, but the thing is, the name of the file is always different (every 30 seconds I create a new one). How can I make my code know which file to upload 30 seconds?
I thought something like this would work:
Ftp f.Connect("xxx" "xxx" "xxx")
if(!f.FilePut("d:\userdata\p11silva\desktop\exports1\%s.csv" "%s" &xs, &xs)) OnScreenDisplay "FTP error: upload failed."
1
f.Disconnect
OnScreenDisplay "FTP Session Ended"
But I guess I'm thinking "C".
Can anybody help me?
Thanks a lot!