|
Answer» 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
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?
|