Results 1 to 6 of 6

Thread: MS DOS ftp[Solved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2003
    Location
    Greece, Salonica
    Posts
    473

    Arrow MS DOS ftp[Solved]

    Hi...
    Does anyone here know how to use the dos ftp?
    I know how to connect but i dont know how to upload a file...
    Lets say i have a picture in "E:\Documents and Settings\Mike\My Documents\My Pictures\" named smiley.gif
    How do i upload this image on the ftp server?

    Thanks!
    Last edited by mike2; Jul 11th, 2004 at 02:46 AM.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Use the put command. It will ask for the path of the file on the local computer and the path of where you want to put it on the server.
    Code:
    ftp> put
    Local file C:\myfile.txt
    Remote file upload/myfile.txt
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2003
    Location
    Greece, Salonica
    Posts
    473
    Hehe.
    Thanks
    That worked.
    I was also doing it this way but it wasnt working because i was using spaces in the filename...
    Now is there a way to create a batch file that will log me in to the FTP server, upload a file and then disconnect?
    Maybe:
    Code:
    connect server.com
    user UserName
    pass PassWord
    put blah.txt
    disconnect
    bye
    ?

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Put all your FTP commands into a file - one on each line and run FTP as follows:
    Code:
    ftp -s:filename.txt
    FTP will execute each line of the script one after another.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2003
    Location
    Greece, Salonica
    Posts
    473
    Hmmm ok thanks!
    Also is there a way to use spaces in filenames?

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Originally posted by mike2
    Also is there a way to use spaces in filenames?
    Either enclose them in quotes or use the DOS file name format. I.e. take the first six characters insert a tlide and then a number. So "My Documents" becomes "MyDocu~1".
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width