-
todda.jones@kmbs
Guest
Put -delete -filemask... Failing (seemingly simple script)
Advertisement
Advertisement
-
todda.jones@kmbs
Guest
Re: Put -delete -filemask... Failing (seemingly simple script???)
< 2022-08-23 16:12:40.245 Script: sftpXXX:/Incoming/Sweeps > 2022-08-23 16:12:40.245 Script: put -delete *.tif >1N < 2022-08-23 16:12:40.245 Script: Are you sure you want to transfer multiple files to a single file '>1N' in a directory 'sftpXXX:/Incoming/Sweeps'? < 2022-08-23 16:12:40.245 The files will overwrite one another. < 2022-08-23 16:12:40.245 If you actually want to transfer all files to a directory 'sftpXXX:/Incoming/Sweeps/>1N/', keeping their name, make sure you terminate the path with a slash. . 2022-08-23 16:12:40.245 Copying 3 files/directories to remote directory "sftpXXX:/Incoming/Sweeps" - total size: 802,120 < 2022-08-23 16:12:40.558 Status code: 20, Message: 1799, Server: The filename, directory name, or volume label syntax is incorrect. , Language: en * 2022-08-23 16:12:40.558 (ETerminal) The filename is not valid. * 2022-08-23 16:12:40.558 Error code: 20 * 2022-08-23 16:12:40.558 Error message from server (en): The filename, directory name, or volume label syntax is incorrect. . 2022-08-23 16:12:40.558 Asking user: . 2022-08-23 16:12:40.558 Cannot create remote file 'sftpXXX:/Incoming/Sweeps/sftpXXX:/Incoming/Sweeps/>1N.filepart'. ("The filename is not valid.
put and delete tif files older than 1 minute
then
put and delete txt files older than 2 minutes
Attempting the following:
put -delete -filemask="*.tif<=1N" *
-
martin◆
Site Admin - Joined:
- Posts:
- 41,518
- Location:
- Prague, Czechia
Re: Put -delete -filemask... Failing (seemingly simple script)
The source parameter of the
https://winscp.net/eng/docs/scriptcommand_put
So this would work:
but this is more straightforward way to do the same (basically what you did originally)
Or oneliner:
put
command is mandatory.
https://winscp.net/eng/docs/scriptcommand_put
So this would work:
but this is more straightforward way to do the same (basically what you did originally)
Or oneliner:
put -delete *.tif>=1N *.txt>=2N
- Guest
Re: Put -delete -filemask... Failing (seemingly simple script)
NICE! Thanks Martin.
I think my original problem was the "direction" of the
My brain said they should be opposite and I used the wrong one.
Working as expected. Any performance hits with the
I think my original problem was the "direction" of the
>
or <
My brain said they should be opposite and I used the wrong one.
Working as expected. Any performance hits with the
-filemask
tag?
-
martin◆
Site Admin
Re: Put -delete -filemask... Failing (seemingly simple script)
Not sure what performance hits you assume. Comparing to what?
Advertisement
You can post new topics in this forum