Transfer files from one FTP to another FTP

Come here to discuss FileZilla and FTP in general

Moderator: Project members

Post Reply
Message
Author
fortega
500 Command not understood
Posts: 1
Joined: 2023-11-30 22:31
First name: Francisco
Last name: Ortega

Transfer files from one FTP to another FTP

#1 Post by fortega » 2023-11-30 22:47

I need to download all the content from one FTP to another.
It consists of many folders, each of them having multiple subfolders. Inside each folder, there are at least 10 files, but always 3 files and a folder, let's call them '1.jpg, 2.jpg, 3.html,' and the folder 'armoni,' that are repeated in all folders and subfolders.
I need to be able to download the entire FTP and transfer it to another FTP without taking those 3 files and the 'armoni' folder. At the same time or in another step, I need to place in each folder and subfolder another 3 files, which would be '4.jpg, 5.jpg, 6.html,' and the 'armoni' folder.
I have to do this once a week.
I know it's difficult to explain, but can you think of a way to do it? Thanks.

User avatar
botg
Site Admin
Posts: 35566
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Transfer files from one FTP to another FTP

#2 Post by botg » 2023-12-01 08:24

You might be able to use FileZilla Pro CLI for this, though you would still need to create a program or script that invokes the tool and parses its output. FileZilla Pro CLI can be set configured to output JSON snippets, so parsing its output should be simple.

What your script would do, invoking FileZilla Pro CLI for each operation: List the contents of the root directory on the source server. Parse the listing, ignore the undesired items. Download each file and upload it to the target server. For each subdirectory, just call the script recursively. At the end, upload any extra files to the target server.

Post Reply