Click here to Skip to main content
15,884,598 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

I'd like to download all the files and folders from an industrial PC in order to automate a backup task.

That should be done with a batch file.

I've seen mget and get FTP commands, but it seems that is not working recursively and it only detects files as possible targets... folders are marked as "not a regular file"

My script is called using:

ftp -i -s:ftpscript.txt


The contents of the script are:

open 192.168.1.1

username

password

lcd c:\myDestinationFolder

mget *.*

quit


Any idea?

Thank you very much.

What I have tried:

Searched the Internet, read all the documentation about FTP commands.
Posted
Updated 15-May-19 2:09am

1 solution

I cannot find anything in NSFTOOLS: List of FTP commands for the Microsoft command-line FTP client[^] which allows to determine whether a folder's element is a folder or a file. I do not think you will be able to achieve your goal by using purely the script facility of genuine Windows ftp client.
You could develop an application to handle the logic, though. There are ftp client libraries for all major languages and technologies.
Kindly.
 
Share this answer
 
Comments
Joan M 15-May-19 9:40am    
Thank you for your answer phil.o... I think you are right, I've not been able to find anything similar... Let's see if the wget linux command ported to windows does it... in case it doesn't I'll try to use WinSCP that seems it can be automated via scripts.

Thank you again.
phil.o 15-May-19 9:59am    
You are welcome Joan.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900