Folder Transfers / Moving
Hey team,
I'm working with some folders that on the client end, are generated periodically with unique names: for example:
- /Top_level_folder
--/Monitored folder
---/Dynamic_folder_xxx
----files_within.txt
----files_within2.txt
On the client end, I am uploading /Dynamic_folder_xxx to our FTP server without issue. What I then need to do, is transfer that FOLDER to an external FTP server. I undestand how to do this with files, but if I apply that same logic to a FOLDER - it sends individual files from within that FOLDER, rather than the entire folder itself like the below:
-/remote_root_folder
--files_within.txt
--files_within2.txt
Long story short, I want to move and/or send FOLDERS that contain files, rather than just individual files.
Any assistance or tips would be awesome.
-
Hi Patrick, most desktop clients, like Filezilla or WinSCP, handle this by default. Basically when it comes time to upload a subfolder and its files, the client software tests if the subfolder exists by trying to go to it. If it can't, it attempts an mkdir to make the directory, then, once it has made the directory, it recurses through the files to upload including the new subfolder in the remote filepath. If you're using a scriptable client, you will need to program it to do the same type of thing. You might want to see if there is a forum, or support, for the client you are using to see how to script it to do what you're looking for.
Please sign in to leave a comment.
Comments
1 comment