Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

DOS Command


2 replies to this topic

Edmundo

Edmundo
  • Members
  • 26 posts

Posted 25 June 2001 - 16:53

Issue:

From the command line:
ftp>

I want to run: "Open csldv2"
ftp> Open csldv2

Is there a function that allows me add the text "Open csldv2" and run this command????


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 June 2001 - 21:33

I think you can store your ftp commands in a text file and feed this into the ftp program. Something like this:

ftp.exe < commands.txt

where copmmands.txt would include a line like this:

Open csldv2

I think this technique is called input redirection - you'll find more in some DOS book, web site or help file I guess.


Torgui

Torgui
  • Members
  • 27 posts

Posted 28 June 2001 - 13:47

Windows NT:
c:>ftp --help
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] [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.
 -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.

So what you can do, is to create a text file with the following contents (let's name the file as ftp.txt):
open csldv2
username
password
operation1
...
operationN
quit

Then command ftp -s:ftp.txt