Sniptools » Tips/Tricks

FTP a file with a single click (Windows)

May 29, 2003 Views (7,216) /  Comments (2) /  Trackback (0) / Digg/Share


  • Under your file Folder Options in Explorer for Win 95/98/2k, create a new associated file type (e.g., *.ftp).
  • Create an Edit entry with: C:\WINNT\NOTEPAD.EXE “%1”, or your favorite text editor.
  • Create a Run Entry that is set default that does: ftp.exe -s:”%1”, note you may have to include the path to ftp.exe. Now make a text file with the commands you want to run:
open mysite.com
username
password
cd /www
mput index.html
mput page1.html
mput page2.html
bye

Voila! When you double-click the file it will automatically FTP the file to your site.

(105 Words | )

 
Possibly Related
Other stuff that may be of interest  
Comments
What readers have asked/said/added.

^1 Anthony said on September 28, 2003 8:52 PM:

I think this is a great trick, but I can’t get it to work. Any suggestions?

^2 periboob said on March 12, 2005 1:33 PM:

Most of my FTPing is to my web site, but with a different file depending on what is being updated. I use this batch to build a script like yours on the fly. I have a shortcut to this batch file, which I drag a file to which auto-ftps the file to my web page.

:: ==== putfile.bat ======
echo off
if “%1”==”” goto usage

:: build a script file
echo account_name>putfil.scr
echo password>>putfil.scr
echo binary>>putfil.scr
echo prompt>>putfil.scr
:: path and name of the file dropped on the icon
echo put %1 >>putfil.scr
echo quit >>putfil.scr

:: and finally run the script just created
:: to upload to your site
ftp -s:putfil.scr upload.domain.com
goto end

:usage
echo.
echo Nothing found to transfer
echo.
echo This BatchFile Icon is meant to have a single file dropped on it.
echo Dropping a file will cause it to be copied to the mtopping website.
echo SPACES NOT ALLOWED in path or file names.
echo.
:end
pause

======= end of code ==========

 

Post a comment
Please be decent while posting comments, don't make us delete them, thanks.




Will be spam-protected.

Remember?


Comment Preview

XX said on :

 

Trackbacks
Ping @ http://sniptools.com/ping/2003-05/16. Listed below are links to weblogs that reference this article.

 

Referrals
*Some* places that viewers have come to this page from: