Forum Index \ DriveHQ Customer Support Forum \
Read/Reply : 7170/4
  • mcfly007
  • (4 posts)

Ok i know how to connect to the ftp via.

ftp

open ftp.drivehq.com 21

username

password

 

then how do i upload?

everytime i use put filepath\text.txt

it doesn't do anything? what am i doing wrong? any ideas?


9/2/2013 7:06:11 PM

  • DriveHQSupport
  • (427 posts)
Subject: Re:upload files using batch

Please provide the detailed information about the problem. Do you see any error message?

If not, I guess it is the very famous FTP problem - you need to use Passive FTP instead of Active FTP. Most routers block Active FTP. Passive FTP is rarely blocked.

You need to use a router that supports Active FTP, or you can use a different FTP client. Unfortunately, Microsoft command-line FTP client does not support Passive FTP. You need to use a GNU version FTP client, or any GUI-based FTP client, such as FileZilla.

Alternatively, you can use DriveHQ FileManager for automatic folder synchronization, or use our WebDAV drive mapping service, then use DOS command to copy files directly.


Reply
9/3/2013 11:13:14 AM

  • mcfly007
  • (4 posts)
Subject: Re:upload files using batch

@echo off
echo user mcfly007> ftpcmd.dat
echo password>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat ftp.drivehq.com 21
mput C:\users\%username%\Desktop\text.rar
pause
del ftpcmd.dat
 

Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.

FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host

  -v             Suppresses display of remote server responses.
  -n             Suppresses auto-login upon initial connection.
  -i             Turns off interactive prompting during multiple file
                 transfers.
  -d             Enables debugging.
  -g             Disables filename globbing (see GLOB command).
  -s:filename    Specifies a text file containing FTP commands; the
                 commands will automatically run after FTP starts.
  -a             Use any local interface when binding data connection.
  -A             login as anonymous.
  -w:buffersize  Overrides the default transfer buffer size of 4096.
  host           Specifies the host name or IP address of the remote
                 host to connect to.

Notes:
  - mget and mput commands take y/n/q for yes/no/quit.
  - Use Control-C to abort commands.
'mput' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .

 


Reply
9/3/2013 11:30:39 AM

  • mcfly007
  • (4 posts)
Subject: Re:upload files using batch

@echo off
cls
ftp
open ftp.drivehq.com 21
mcfly007
password
cd wwwhome
mput "C:\Documents and Settings\%username%\Desktop\,\test1\little devil v1.0\archive.rar"
y

i figured out the code now i just need to figure out how to make this a batch file.


Reply
9/3/2013 2:46:51 PM

  • mcfly007
  • (4 posts)
Subject: Re:upload files using batch

in regular ftp mode i just type this.
how do i automate this to upload acrhive.rar to wwwhome? 
  ftp
    open ftp.drivehq.com 21
mcfly007
helloworld
     cd wwwhome
     bin
     hash
     put "archive.rar"
     bye


Reply
9/3/2013 4:45:15 PM

Quickly Reply

Please logon and reply, Not DriveHQ Member?