I cannot send a file to a directory with the device. The code works ok on the desktop but not the device
I know i have a connection
Msgbox(ftp.IsFTPConnected)
Ans = TRUE
Msgbox(ftp.GetCurrentDirectory)
ANS = "/"
ftp.SetCurrentDirectory("/Distinctive")
Msgbox(ftp.GetCurrentDirectory)
ANS = "Distinctive"
Msgbox(ftp.GetCurrentDirectory)
ftp.SetCurrentDirectory("Distinctive")
Msgbox(ftp.GetCurrentDirectory)
SfileName = "Orders.txt"
ftp.PutFile(SfileName,SfileName)
Then i get an error message saying "error uploading file"
Can anyone advise what is wrong?
Thanks
joe
Ok After some trial and error i was able to succesfully download a file using this
ftp.GetFile("Info.csv",AppPath & "\Test1.csv")
So then i tried
SfileName = AppPath & "\Test.txt"
DfileName = "Test.txt"'
ftp.PutFile(SfileName,DfileName)
The code ran to the end without any error message but the file was not placed on the internet site
OK everything cool
I neglected to refresh the internet directory so i did not see that the file had in fact been uploaded.
It seems my original error was in not putting the AppPath into the equation for the program to see the file
I know i have a connection
Msgbox(ftp.IsFTPConnected)
Ans = TRUE
Msgbox(ftp.GetCurrentDirectory)
ANS = "/"
ftp.SetCurrentDirectory("/Distinctive")
Msgbox(ftp.GetCurrentDirectory)
ANS = "Distinctive"
Msgbox(ftp.GetCurrentDirectory)
ftp.SetCurrentDirectory("Distinctive")
Msgbox(ftp.GetCurrentDirectory)
SfileName = "Orders.txt"
ftp.PutFile(SfileName,SfileName)
Then i get an error message saying "error uploading file"
Can anyone advise what is wrong?
Thanks
joe
Ok After some trial and error i was able to succesfully download a file using this
ftp.GetFile("Info.csv",AppPath & "\Test1.csv")
So then i tried
SfileName = AppPath & "\Test.txt"
DfileName = "Test.txt"'
ftp.PutFile(SfileName,DfileName)
The code ran to the end without any error message but the file was not placed on the internet site
OK everything cool
I neglected to refresh the internet directory so i did not see that the file had in fact been uploaded.
It seems my original error was in not putting the AppPath into the equation for the program to see the file
Last edited: