# test A get * *.dl # test B get * *.*.dl
For example give the following list of files to download:
test1.xyz.12345 test1.xyz.54321 test1.xyz.98765
A workaround is to use a hyphen in place of the dot for the appended text string. Here is the syntax for test C:
# test C get * *-dl
test1.xyz.12345-dl test1.xyz.54321-dl test1.xyz.98765-dl
The documentation for the Operation Mask (https://winscp.net/eng/docs/operation_mask) states:
Test B refutes this claim when attempting to append a dotted text value to a file name.WinSCP by default offers you operation mask *.* that leaves filename as is.
In summary, file names are no longer limited to 8x3 nomenclature and as I have no control over what others upload, I feel there should be a way for WinSCP.com to append dotted text values without the loss of what formally was known as the file “extension”. Maybe in a future release, there can be an option to toggle the option mask mode as either “regular expressions” or ”masking tool”. Adding the option for regular expressions would solve the problem and open the door to new ways of manipulating the destination file name.
- WinSCP Version: 5.15.4
Platforms tested: Server 2012 R2, Windows 10, Windows 7, and Windows XP
Transfer Protocol: sFTP via scripted WinSCP.com
Here is the command line:
"c:\Program Files\WinSCP\WinSCP.com" /script=test.script /parameter // c:\tmp >c:\tmp\LogFile.log
option batch abort option confirm off open "test FTP site" cd "/var/tmp/WinSFTP Test" lcd "c:\tmp\WinSFTP Test" dir # test A get * *.dl # test B get * *.*.dl # test C get * *-dl close exit
batch abort confirm off In scripting you should not rely on saved sites, use this command instead: open [snip] Searching for host... Connecting to host... Authenticating... Using username "root". Authenticating with [snip] Authenticated. Starting the session... Session started. Active session: [snip] /var/tmp/WinSFTP Test c:\tmp\WinSFTP Test -rw-r--r-- 1 root root 135 Sep 24 17:00:03 2019 test1.xyz.12345 -rw-r--r-- 1 root root 15 Sep 24 16:35:45 2019 test1.xyz.54321 -rw-r--r-- 1 root root 10 Sep 25 16:38:23 2019 test1.xyz.98765 test1.xyz.12345 | 135 B | 0.0 KB/s | binary | 100% test1.xyz.54321 | 15 B | 0.1 KB/s | binary | 100% test1.xyz.98765 | 10 B | 0.1 KB/s | binary | 100% test1.xyz.12345 | 135 B | 0.0 KB/s | binary | 100% test1.xyz.54321 | 15 B | 0.1 KB/s | binary | 100% test1.xyz.98765 | 10 B | 0.1 KB/s | binary | 100% test1.xyz.12345 | 135 B | 0.0 KB/s | binary | 100% test1.xyz.54321 | 15 B | 0.1 KB/s | binary | 100% test1.xyz.98765 | 10 B | 0.1 KB/s | binary | 100% Session [snip] closed. No session.