Differences
This shows you the differences between the selected revisions of the page.
2009-02-20 | 2009-02-20 | ||
full example for upoading file, use open command instead of opening from command line (martin) | standard set of options in all scripts (martin) | ||
Line 6: | Line 6: | ||
<code> | <code> | ||
- | winscp.com /command "option batch abort" "open user@example.com" "put examplefile.txt /home/user/" "exit" | + | winscp.com /command "option batch abort" "option confirm off" "open user@example.com" "put examplefile.txt /home/user/" "exit" |
</code> | </code> | ||
Line 13: | Line 13: | ||
<code winscp> | <code winscp> | ||
option batch abort | option batch abort | ||
+ | option confirm off | ||
open user@example.com | open user@example.com | ||
put examplefile.txt /home/user/ | put examplefile.txt /home/user/ | ||
Line 41: | Line 42: | ||
<code winscp> | <code winscp> | ||
+ | option batch abort | ||
+ | option confirm off | ||
open session | open session | ||
get /home/user/examplefile.txt *.%TIMESTAMP%.txt | get /home/user/examplefile.txt *.%TIMESTAMP%.txt | ||
Line 51: | Line 54: | ||
<code php> | <code php> | ||
+ | option batch abort | ||
+ | option confirm off | ||
open session | open session | ||
get /home/user/examplefile.txt *.<?=date("YmdHis")?>.txt | get /home/user/examplefile.txt *.<?=date("YmdHis")?>.txt | ||
Line 59: | Line 64: | ||
<code winscp> | <code winscp> | ||
+ | option batch abort | ||
+ | option confirm off | ||
open session | open session | ||
get /home/user/examplefile.txt *.20060605090825.txt | get /home/user/examplefile.txt *.20060605090825.txt | ||
Line 74: | Line 81: | ||
<code winscp> | <code winscp> | ||
+ | option batch abort | ||
+ | option confirm off | ||
open session | open session | ||
# Make copy of the remote file to temporary timestamped file. | # Make copy of the remote file to temporary timestamped file. | ||
Line 91: | Line 100: | ||
<code winscp> | <code winscp> | ||
+ | option batch abort | ||
+ | option confirm off | ||
open session | open session | ||
# Make copy of the most recent file using remote command to new name | # Make copy of the most recent file using remote command to new name | ||
Line 108: | Line 119: | ||
<code winscp> | <code winscp> | ||
- | # Make the script abort on any error | ||
option batch abort | option batch abort | ||
+ | option confirm off | ||
# Connect | # Connect | ||
open session | open session |