• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0

Upload file script assistance

Question

sini    10

Hello, I am currently uploading a csv file that changes fairly frequently (1-2 seconds) via a batch script and ftp. While this does work it's fairly slow. More time is spent on the ftp commands than actually uploading the file (300-500 bytes).

 

Any assistance or guidance in a better process would be greatly appreciated.

 

upload.bat

:loop
ftp -s:ftp.txt
goto loop

 

ftp.txt

open ftp.site.com
login
password
binary
put "file.csv"
disconnect
bye

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
+virtorio    3,100
Posted (edited)

Write an upload script (with something like Python instead of a batch file) that re-uses the connection, so you don't have to connect each time. 

Share this post


Link to post
Share on other sites
  • 0
sini    10

Thanks. I'm not familiar with python. May have to do some research. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.