Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Need help.. FTP Uploader  (Read 1979 times)

0 Members and 1 Guest are viewing this topic.

eSkiSo

  • Guest
Need help.. FTP Uploader
« on: March 28, 2006, 12:38:35 AM »
I am trying to make a .BAT file that uploads a file when he is draged to the .bat file..

For example , i have a pic.jpg and i want to upload it just by dragin it to icon of the .bat file..
(the original idea is to use the Send To menu, by outing the bat file in the Send To folder)

My problem is: how do i make the path & filename in a variable... /because if you drag a file to CMD it will give you the path...\ i want to use that path to upload..

This is what i got now: [ 2 Files a .bat and a .dll witch is the FTP script ]

1. The conection.dll -> FTP Script for conect
Code: [Select]
open ftp.host.com
username
password
cd www
put
HERE I NEED THE PATH/FILENAME
Update.txt

2. The FTPit.bat -> The trigger witch runs FTP

Code: [Select]

@ECHO OFF
title FTP QUICK UPLOADER
ECHO FTP QUICK UPLOADER
ftp -s:conection.dll
PAUSE


DosItHelp



    Intermediate
    Re: Need help.. FTP Uploader
    « Reply #1 on: April 02, 2006, 12:30:33 AM »
    After dropping the file on the bat, it's file name will be available in the batch as the first argument, i.e.
    "%~1" or better "%~f1".

    For ftp upload scripts you might want check this out:
    http://dostips.cmdtips.com/DtCodeBatchFiles.php

    DOS It Help?