문제

I have a question regarding copying multiple files from one directory to another remote directory in SSIS. I'm using WinSCP, below is my script file.

option batch on
option confirm off
open username:password@ipaddress -timeout=1000 -hostkey="ssh-rsa 39439:xx:xx:xx:xx:xx"
option transfer binary
put c:\temp\*.xlsx
close
exit

It copies the first file successfully, I have couple more to be copied. Is this the correct way to copy multiple files?

도움이 되었습니까?

해결책

Yes, this is a correct way to upload multiple files.

It does not work, because your server does not support preserving file timestamp.

You can make WinSCP not try to preserve the timestamp by adding the -nopreservetime switch to the put command.

put -nopreservetime c:\temp\*.xlsx

For more details see the documentation for the error message Upload of file .. was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option..

다른 팁

If the file is locked (in use), change "batch" to "continue", to skip errors.

option batch continue
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top