Page 1 of 1

Syncfile with subfolders

Posted: June 17th, 2021, 7:51 pm
by Harry
Dear all,

I want to download from a FTP server the files from a folder, including all subfolders on it, but syncfile function does not have a parameter for that (like recursive of dirlist function). I can not do a syncfile function calls for each subfolder because I do not know before hand the subfolders names to download. Someone has a idea how to do it?

Kind regards

Harry

Re: Syncfile with subfolders

Posted: June 21st, 2021, 11:19 am
by Gregory Martin
Using current CSPro functionality, there is no way to get a server's directory listing.

Could you restructure your program so that all files go in the same directory? With the proper file naming scheme, you could use syncfile with a universe to restrict what files are downloaded at any particular point.

Re: Syncfile with subfolders

Posted: June 21st, 2021, 3:42 pm
by Harry
Thanks Gregory for your answer.
I thing the solution is to put in the server a zip file with all the files and subfolders inside.

Cheers,
Harry