I wrote a small VBS script which will upload a file to an FTP server and put a
link to it in your windows clipboard. The script is written to be used withScreenshot Captor
but can also be used externally.
You can get it here:Upload_to_FTP.zip
It is my first contribution to DonationCoder, so please be kind with your criticisms.
I hacked this together because I always missed this functionality in Screenshot
Captor. In this forum there were some discussions going on on how to get this
functionality into SC. The most common solution was to use either FtpUpload.exe
or RCFtp. FtpUpload.exe provided the clipboard functionality but was not able to
upload the file anywhere other than the root directory and RCFtp didn't provide
the clipboard functionality.
So here we have both: possibility of uploading the file to any directory on the
FTP server and a handy link to that file in your windows clipboard afterwards.Requirements:
with installed Scripting Host
Internet Explorer (for clipboard functionality)
The script was only tested on Windows XP Professional yet.
If you want to try it on another version, please inform me about the results.Usage with Screenshot Captor:
1. Copy the script into your Screenshot Captor directory
2. Create a new external tool link in Screenshot Captor:
2.1. Menu "Tools" -> "Configure external tools" -> "add"
2.2. Think of a nice title (eg. "Upload to FTP")
2.3. Insert screenshot_to_ftp.vbs as Program
2.4. Leave working dir blank (the script uses your windows home directory
to create a small temp file which is deleted right after execution)
2.5. The parameters for the script are: ftpserver username password externalpath filename [url]
- FTP-Server: the server where you want to put your screenshot
- User name: the user name to use for the ftp server
- Password: the password to use for the ftp server
(use "" for empty password)
- External path: the directory on the server to put the file into
Use a simple slash (/) if you want to upload to the root directory
- File name: use "%file%" including quotes
- URL (optional): the URL which is copied to your clipboard.
Leave URL empty if you don't want to use the clipboard functionality Example:
ftp.foobar.org foo bar /foo/bar/ "%file%" http://www.foobar.org/foo/bar/
This will connect to ftp.foobar.org with "foo" as username and "bar" as
password. It will then change to the directory /foo/bar/ on the server and
put the selected file there via FTP. The given URL is then completed with
the filename and will be written to the windows clipboard.
PLEASE NOTE that both external path and URL have to end with a slash (/).
If you want to put the file to the root directory of the server, use "/"
(without quotes) as external path.
Here is how it looks like when you're done:
3. You can now select a file in Screenshot Captor and use Tools -> Upload to FTP
to upload the file. The URL to the file will be ready for use in your windows
clipboard afterwards.Usage without screenshot captor:
If you're into batch programming, you may also use this script from a DOS batch
file. Just call it bycscript [Drive:\][Path to file]\screenshot_to_ftp.vbs ftpserver username password externalpath filename url
and it will behave just as described above.Known limitations:
- Empty password is not possible (any idea on how to realize a variant number of Found bugs? Added some functionality?
Feel free to contact me. I will try to answer every post but please give me some time. I got a life to live, y'know