pvg1975
asked on
ftp file with vb.net
Hi all,
I need to transfer a file every day at 1 AM thru FTP, just transfer the file (So I dont care about listing, etc).
Can this be done with VB.NET (framework 4) without acquiring a third party component?
I saw some sample code at http://social.msdn.microsoft.com/Forums/da-DK/vblanguage/thread/63796964-f88a-40cf-91eb-08e71e98fa83 but it didnt work.
Thanks!
Thanks.
I need to transfer a file every day at 1 AM thru FTP, just transfer the file (So I dont care about listing, etc).
Can this be done with VB.NET (framework 4) without acquiring a third party component?
I saw some sample code at http://social.msdn.microsoft.com/Forums/da-DK/vblanguage/thread/63796964-f88a-40cf-91eb-08e71e98fa83 but it didnt work.
Thanks!
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I would use WinSCP
C:\PROGRA~1\WinSCP\WinSCP. exe /command "option confirm off" "open sftp://fulton:fulton9#@ftp.atlantaga.gov" "put C:\DailyQueries\AllQueries _APD.csv " "exit"
download and install it.
It is usually installed on C:\Program Files\Winscp...
Then all you would need to do is go to windows scheduler, schedule it with this line:
C:\PROGRA~1\WinSCP\WinSCP. exe /command "option confirm off" "open sftp://username:Password@yourdestination" "put C:\thefileToTransfer" "exit"
Example:
C:\PROGRA~1\WinSCP\WinSCP. exe /command "option confirm off" "open sftp://myusername:mypassword@ftp.mysite.com" "put C:\Folder\file.txt" "exit"
Then schedule it to transfer daily at your specified time.
That's it
C:\PROGRA~1\WinSCP\WinSCP.
download and install it.
It is usually installed on C:\Program Files\Winscp...
Then all you would need to do is go to windows scheduler, schedule it with this line:
C:\PROGRA~1\WinSCP\WinSCP.
Example:
C:\PROGRA~1\WinSCP\WinSCP.
Then schedule it to transfer daily at your specified time.
That's it
ASKER
Hi Sammy!
There's an application already schedulling a zillion things lol... I just needed to upload a file.
Thanks for your answer :)
Paula
There's an application already schedulling a zillion things lol... I just needed to upload a file.
Thanks for your answer :)
Paula
You can make a batch command file, look for auto login here:
http://support.microsoft.com/kb/96269/en-us
or
http://www.walkernews.net/2007/05/08/auto-file-transfer-via-ftp-batch-scripts/
command to upload is:
put myfile.pdf
http://support.microsoft.com/kb/96269/en-us
or
http://www.walkernews.net/2007/05/08/auto-file-transfer-via-ftp-batch-scripts/
command to upload is:
put myfile.pdf
ASKER
Thanks for your quick answers guys, I will assign you the points.
Paula.
Open in new window