FTP a file with a single click (Windows)

Quickly update files on a ftp site by just dou­bleclick­ing on a file!

  • Under your file Folder Options in Explorer for Win 95/98/2k, cre­ate a new asso­ci­ated file type (e.g., *.ftp).
  • Cre­ate an Edit entry with: C:WINNTNOTEPAD.EXE "%1", or your favorite text editor.
  • Cre­ate 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 com­mands you want to run:
open mysite.com
user­name
pass­word
cd /www
mput index.html
mput page1.html
mput page2.html
bye

Voila! When you double-click the file it will auto­mat­i­cally FTP the file to your site.

2 comments
  1. Anthony says: Sep 28, 20038:52 pm

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

  2. periboob says: Mar 12, 20051:33 pm

    Most of my FTPing is to my web site, but with a dif­fer­ent file depend­ing on what is being updated. I use this batch to build a script like yours on the fly. I have a short­cut 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 cre­ated
    :: to upload to your site
    ftp –s:putfil.scr upload.domain.com
    goto end

    :usage
    echo.
    echo Noth­ing found to trans­fer
    echo.
    echo This Batch­File Icon is meant to have a sin­gle file dropped on it.
    echo Drop­ping a file will cause it to be copied to the mtop­ping web­site.
    echo SPACES NOT ALLOWED in path or file names.
    echo.
    :end
    pause

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

Submit comment