How do I copy txt files from a specific folder on an FTP site (which is password protected) to a local folder on my pc using a windows batch file -


i've been researching hours on how to copy specific files folder on ftp site, local folder on pc. anytime think got something, re-read , confused. can spell out me on how accomplish below scenario:

dummy info: ftp site:  ftp://ftp.johndoe.com ftp un:  john ftp pw:  123 

folder on ftp site contains files want:

ftp://ftp.johndoe.com/out 

items wish retrieve folder: .txt files need copy to:

c:\users\johndoe\desktop\ftp access testing 

afterwards need delete in:

ftp://ftp.johndoe.com/out 

i post code don't know start. can please walk me through this?

okay, not wanted, because should write yourself.

but asked bread crumbs; example of how this.

these 3 files used set quick download -- storing cleartext passwords bad idea. bad idea. really, bad idea.

also, you'll need consider if should delete files on ftp site, or you've downloaded. latter far superior, requires fair investment of time design process give safety. luck.

anyway -- download. 3 files follow.

the first 1 sets directories needed:

set-it-up.bat  @echo off md "c:\users\johndoe\desktop\ftp access testing\admin" md "c:\users\johndoe\desktop\ftp access testing\download" 

the second 1 batch file perform download:

download.bat  @echo off c: cd "\users\johndoe\desktop\ftp access testing\download" ftp -s ..\admin\doit_input_dl.txt ftp://ftp.johndoe.com dir 

the third 1 input file ftp process.

doit_input_dl.txt  john 123 prompt ascii cd /out mget *.txt close bye 

if doesn't give enough information round out process, need find can code batch files.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -