...
The file_spec option expects a regular expression to select files from the directory which is set by the source_dir option.
In the following first profile filespec we want to transfer transfers all files from /jade/out to /tmp/test/jade/in which names are ending with .txt.
In the second profile recursive the recursive option (default:no) is used to transfer all files from subdirectories of source_dir too which names are ending with .txt.
Code Block |
---|
[filespec] include = copy_webdav2local source_dir = /jade/out file_spec = \.txt$ [recursive] include = copy_webdav2local source_dir = filespec/jade/out file_spec = \.txt$ recursive = true |
Example: transfer from local file system to WebDAV server
...
Code Block |
---|
[local_source_host] source_protocol=local source_dir = /tmp/test/jade/in [webdav_target_host] target_protocol=webdav target_host=http://homer.sos/jade target_port=80 target_user=test target_password=12345 target_ssh_auth_method=url target_dir = /jade/in [copy_local2webdav] include = webdav_target_host,local_source_host operation = copy |
The profile copy_local2webdav will be included in further profiles
Example with file_path
These example are similar to above file path example in the WebDAV -> local chapter but in the other direction.
Code Block |
---|
[filepath] include = copy_local2webdav file_path = /tmp/test/jade/in/1. |
...
txt
|
Example with file_spec
These examples are similar to above file spec example in the WebDAV -> local chapter but in the other direction.
In the following first profile filespec transfers all files from /tmp/test/jade/out to /jade/in which names are ending with .txt.
In the second profile recursive the recursive option (default:no) is used to transfer all files from subdirectories of source_dir too which names are ending with .txt.
Code Block |
---|
[filespec]
include = copy_local2webdav
source_dir = /tmp/test/jade/out
file_spec = \.txt$
[recursive]
include = copy_local2webdav
source_dir = /tmp/test/jade/out
file_spec = \.txt$
recursive = true
|