Home Page
        Orders     Downloads     Support     Contact     Deutsch
ZOC Terminal is a professional SSH Client and Terminal Emulator for Windows and macOS.
PyroBatchFTP Online Help Topic:

Script Commands → GetDir

GetDir [-rM] [<filename pattern>] [, <directory pattern>]

 

The GetDir command downloads all files from the current remote directory into the current local directory. If the option parameter is supplied, a letter r will make the command will also download the files from subdirectories (if the optional directory pattern parameter is also supplied, -r will only apply to directories which match the pattern) An M there will move the files (delete local file after transfer).

GetDir also supports the -i, -h, -l, -o, as well as -y and -d parameters to select files based on date/time as described with the GetSync command.

Files are transferred between the current local and remote directories, so you probably will need LocalChDir and RemoteChDir commands before actually starting the transfer.

If you supply the optional pattern parameter, the transferred files will be filtered by filename/foldername patterns

For this command, you should also use FtpMode "AUTO"

 

See also: GetSync, Get, Put, :Filename/Foldername Patterns

 

Examples:

GetDir -r

GetDir "*.htm"

GetDir -d0 "*.log" (download log files with a file date of today)

GetDir -r "*.htm" "[*; ~tmp*]" (Download .htm files from all subdirectories except subdirectories which have a name starting with "tmp*")

GetDir -r "[*; ~*.tmp]", "[*; ~temp*; ~_*]" (Download all files except *.tmp from the current directory and subdirectories, except those directories which have a name beginning with 'temp' or '_').)

 
← Back to Script Commands

 

Downloads
Orders
Contact
Support
Terms of Use
Privacy Policy
pixel