Download folders and files only where folder contains specific file

Advertisement

Mattias
Guest

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,034
Location:
Prague, Czechia

Re: Download folders and files only where folder contains specific file

Do you want to download only the final.txt? Or all files in the folder that has the final.txt? Btw, you cannot create a folder with a name containing a slash on Windows.

Reply with quote

Advertisement

You can post new topics in this forum