Differences
This shows you the differences between the selected revisions of the page.
| guide_protecting_credentials_for_automation 2024-01-27 | guide_protecting_credentials_for_automation 2024-04-22 (current) | ||
| Line 16: | Line 16: | ||
| <code winscp> | <code winscp> | ||
| - | open -username=%naim% -password=%MYPASSWORD% sftp://example.com/ | + | open -username=%USERNAME% -password=%PASSWORD% sftp://example.com/ |
| ... | ... | ||
| </code> | </code> | ||
| Line 24: | Line 24: | ||
| <code batch> | <code batch> | ||
| @echo off | @echo off | ||
| - | set USERNAME=naim | + | set USERNAME=martin |
| - | set PASSWORD=MYPASSWORD | + | set PASSWORD=mypassword |
| winscp.com /script=example.txt | winscp.com /script=example.txt | ||
| </code> | </code> | ||
| ---- | ---- | ||
| - | Another way is to store the password to a separate file and use ''-passwordsfromfiles'': | + | Another way is to store the password to a separate file and use [[scriptcommand_open#passwordsfromfiles|''-passwordsfromfiles'']]: |
| <code winscp> | <code winscp> | ||
| open -password=C:\path\password.txt -passwordsfromfiles sftp://username@example.com/ | open -password=C:\path\password.txt -passwordsfromfiles sftp://username@example.com/ | ||