Download folders and files only where folder contains specific file
Hi.
Is there a way to check if a file exists in a folder, that I dont know the path to (it is dynamic).
Ie if there are these folders on the FTP
2020/08/27/11/05
2020/08/27/11/10
And in the 2020/08/27/11/05 folder there are a file named final.txt
I want to download the full path localy and create the folders if not exists.
The other folder, 2020/08/27/11/10 does not have a file called final.txt, so this folder I do not want to download.
But I want to delete the folder that do have the final.txt in it.
Is there a way to check if a file exists in a folder, that I dont know the path to (it is dynamic).
Ie if there are these folders on the FTP
2020/08/27/11/05
2020/08/27/11/10
And in the 2020/08/27/11/05 folder there are a file named final.txt
I want to download the full path localy and create the folders if not exists.
The other folder, 2020/08/27/11/10 does not have a file called final.txt, so this folder I do not want to download.
But I want to delete the folder that do have the final.txt in it.