Examples: Directory Transfers
You can use wildcards and tokens to perform different directory transfers.
- To receive all the files in a directory folder, you can use a wildcard on the command line. For example:
cfrecv LocalFileName:’/home/johndoe/data/$(RemoteFileName)’ RemoteFileName:’/mftps/data/*’ n:MFTNodeAs a result of this example, all files from remote
'/mftps/data'directory are received into local'/home/johndoe/data'directory.You can also use the special * token in place of the
$(RemoteFileName)token:cfrecv LocalFileName:'/home/johndoe/data/*' RemoteFileName:'/mftps/data/*' - To send the files in the subdirectories for a directory transfer, you can set
ScanSubDir to
Yon the command line. For example:cfsend ScanSubDir:Y n:PhoenixNode LocalFileName:/home/johndoe/data/* RemoteFileName:/mftps/data/\$(LocalFileName)As a result of this example, all files from '
/home/johndoe/data' folder and sub-folders are sent.You can also use the special * token in place of the
$(LocalFileName)token:cfsend ScanSubDir:Y n:PhoenixNode LocalFileName:/home/johndoe/data/* RemoteFileName:/mftps/data/* - To receive a directory and also duplicate the directory structure from the remote system, you can use the
$(SDIR) token:
cfrecv ScanSubDir:Y LocalFileName:'/home/johndoe/data/$(SDIR)/$(RemoteFileName)' RemoteFileName:'/mftps/data/*' n:MontrealNodeAs a result of this example, all files from '
/mftps/data' directory and subdirectories are received with the same structure.