I want to download entire directory from FTP site with specific files in it via FTP command. Here's the scenario.
1. There can be multiple folder and sub folder in directory. Files are stored in the folder
2. there can be multiple files in folder with different name. The requirement is to download files starts with certain character.
Directory has 3 folders and subfolder and files as listed below. each subolder has 3 files with different name (There can be multiple files)
1. Folder 1 -> Sub Folder 1 -> abc.txt, abd.txt, zyc.txt
2. Folder 2 -> Sub Folder 1 -> abf.txt, abi.txt, zyt.txt
3. Folder 3 -> Sub Folder 1 -> abt.txt, abp.txt, zyd.txt
I need to download above directory with all of the folder, but files needs to be download which starts with "ab" only.
Currently I'm using following FTP command which download all the folder and files.
set "coreFtpPath=C:\Program Files\CoreFTP"
-s -O -site %coreFtpSiteName% -d %RemoteLocation1% -p %downloadLocation% -log %Log% -output %LogOutput%
Please suggest as how can download files with specific name. Also, at the same time I need to download the entire directory with folder names and subfolders.