How to get and delete files from multiple directories and subdirectories
Hi there,
I've got the folllowing directory structure on a FTP server:
/data/
/data/200100/T2251/
/data/200100/T2252/
/data/200200/T3051/
/data/200300/T6051/
In every directory should be pdf files and I didn't know the subdirectory names. Only /data is what I know. I want to get all pdf files and delete them after downloading.
I tried different scripts at least the following script
But it didn't work. Can someone help me how to do it correctly?
Thanks in advance
ralf
I've got the folllowing directory structure on a FTP server:
/data/
/data/200100/T2251/
/data/200100/T2252/
/data/200200/T3051/
/data/200300/T6051/
In every directory should be pdf files and I didn't know the subdirectory names. Only /data is what I know. I want to get all pdf files and delete them after downloading.
I tried different scripts at least the following script
open sftp://xxx:yyy@server:22 get -delete /data/*.PDF D:\pdf_data\ get -delete /data/2*/*.PDF D:\pdf_data\ get -delete /data/2*/T*/*.PDF D:\pdf_data\ exit
Thanks in advance
ralf