Years ago I discovered a very comfortable way of uploading PHP files after editing them, a VBScript named “vbsFTP”. Copied into the “SendTo” folder and updated with some connection information, any file inside the base location on my harddisc could be uploaded to the corresponding remote location with just two clicks whilre preserving the local directory structure (C:\MyLocalHtdocs\a\b\c.php -> /var/www/htdocs/a/b/c.php).

However, this script is using the FTP protocol and ftp.exe integrated into Windows, so that I’m very sure, security comes short.

While installing new servers the last few days, I decided to doom the FTP servers from our brand new debian boxes and came up with my own VBScript that is using PSCP.exe (file copy over SSH, capable of private key authentication) from the Putty package instead:

Installation instructions:

  1. Get the script (and PSCP if you do not have it yet)
  2. Save the script to “C:\Documents\YourWindowsLoginName\SendTo” (XP) or “C:\Users\UserWindowsLoginName\AppData\Roaming\Microsoft\Windows\SendTo” (Vista)
  3. Open it, edit the configuration section at the beginning and save
  4. Make sure the local and the remote directory exist, then switch to the local directory, create or select a file, click right and select “Upload”.

That’s it! The file will be silently uploaded in the background. For creating directories you will still need to do so in the old fashioned way or you add the “-r” parameter in front of “-i” or “-pw” - but I’d not recommend that (may take a long time when accidentally clicking on a big directory). Of course you can install several copies of the script at once.

Happy coding!

Leave a Reply