This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bw:ftp_and_bizweaver [2019/01/18 11:08] runger |
bw:ftp_and_bizweaver [2022/04/22 10:30] (current) akoehler [Sample Command File] |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ==== Basic Process ==== | ==== Basic Process ==== | ||
| - | winSCP is initiated from Bizweaver using the WF_Exec tool. This tool calls a Windows batch (.bat) file. The batch file then calls a text file (.txt) that contains the information needed to execute winSCP. | + | winSCP is initiated from Bizweaver using the WF_Exec tool. This tool calls a Windows batch (.bat) file. The batch file then calls a text file (.txt) that contains the information needed to execute winSCP. Sample scripts are provided below. |
| ==== Sample Batch File ==== | ==== Sample Batch File ==== | ||
| The batch file serves two purposes. | The batch file serves two purposes. | ||
| - | Note that the various files are placed in a folder named "FTP Controls" in the main Bizweaver folder " | + | Note that the various files are placed in a folder named "FTPControls" in the main Bizweaver folder " |
| <file bat winSCP_Main.bat> | <file bat winSCP_Main.bat> | ||
| - | " | + | " |
| - | echo Ending FTP transfer at %date% : %time% >> " | + | echo Ending FTP transfer at %date% : %time% >> " |
| + | |||
| + | ==== Command File ==== | ||
| + | The " | ||
| + | |||
| + | <WRAP center round tip> | ||
| + | You can use the winSCP application to generate the command file for you. Information on the this process is found here https:// | ||
| + | </WRAP> | ||
| ==== Sample Command File ==== | ==== Sample Command File ==== | ||
| - | The " | + | The sample file provided below a command file. Lines that begin with # are comments. |
| <file bat winSCP_Command.txt># | <file bat winSCP_Command.txt># | ||
| - | # option batch abort | + | ## option batch abort |
| # Disable overwrite confirmations that conflict with the previous | # Disable overwrite confirmations that conflict with the previous | ||
| - | # option confirm off | + | ## option confirm off |
| # Connect | # Connect | ||
| # ssh-rsa 2048 6e: | # ssh-rsa 2048 6e: | ||
| # The following establishes a connection using an ssh-rsa key | # The following establishes a connection using an ssh-rsa key | ||
| # " | # " | ||
| - | open username: | + | ## open username: |
| # | # | ||
| # The following establishes a basic SFTP connection | # The following establishes a basic SFTP connection | ||
| - | # open sftp:// | + | ## open sftp:// |
| # | # | ||
| # List remote folder | # List remote folder | ||
| - | # ls | + | ## ls |
| # | # | ||
| # Change the current working remote folder | # Change the current working remote folder | ||
| - | # cd /home/user | + | ## cd /home/user |
| # | # | ||
| # Force binary mode transfer | # Force binary mode transfer | ||
| - | # option transfer binary | + | ## option transfer binary |
| # | # | ||
| # Download file to a local folder | # Download file to a local folder | ||
| - | # This example also deletes | + | # This example also uses the " |
| + | # The option does not necessarily need to be used. | ||
| # The target folder may need to be changed | # The target folder may need to be changed | ||
| - | get -delete *.csv C: | + | ## get -delete *.csv C: |
| # | # | ||
| # Upload the file to current working remote folder | # Upload the file to current working remote folder | ||
| - | # put examplefile.txt | + | ## put examplefile.txt |
| # | # | ||
| - | # Disconnect | + | # Disconnect |
| - | close | + | ## close |
| # Exit WinSCP | # Exit WinSCP | ||
| - | exit </ | + | ## exit </ |
| + | |||
| + | Complete information about command-line options can be found here https:// | ||
| + | |||