Home » Developer & Programmer » Forms » Host command Help? (Oracle 9i, forms 6i)
Host command Help? [message #347568] Fri, 12 September 2008 03:07 Go to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Hi

From client machine

1. i going to command prompt
2. c:\> ftp serveripaddress (connecting for file transfer from client machine to server)
3. control move to server
4. then im using "BIN"
6. either get/put the file from/to client.

Is it possiple to make this flow via "Host".

wbr
kanish
Re: Host command Help? [message #347580 is a reply to message #347568] Fri, 12 September 2008 04:19 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Put the whole FTP code into a batch (.BAT) script which will be executed by the HOST built-in.
Re: Host command Help? [message #347606 is a reply to message #347568] Fri, 12 September 2008 05:40 Go to previous messageGo to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

when i am ftp to the server (it is linux server) it asking for username/password is it possible to pass through via batch file.

kanish
Re: Host command Help? [message #347666 is a reply to message #347606] Fri, 12 September 2008 10:44 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell, yes.
c:\temp>ftp -?

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.

I believe you should research use of the "-s:filename" option which would contain FTP commands (including username and password) (this might be one resource).
Re: Host command Help? [message #348212 is a reply to message #347568] Tue, 16 September 2008 00:50 Go to previous messageGo to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Very much thankful to you first.

It's more helpfule

ECHO on
:: Create the temporary script file
> script.ftp ECHO USER oracle9i
>> script.ftp ECHO Mypassword	
:: Use the temporary script for unattended FTP
:: Note: depending on your OS version you may have to add a '-n' switch
FTP -s:script.ftp 192.9.200.1 | FIND /V "USER" 
:: For the paranoid: overwrite the temporary file before deleting it
TYPE NUL >script.ftp
DEL script.ftp


but i am getting the following error how to solve it


./fa/5032/0/

Thanks
  • Attachment: sample.PNG
    (Size: 10.54KB, Downloaded 1345 times)
Re: Host command Help? [message #348219 is a reply to message #348212] Tue, 16 September 2008 01:21 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
"Login incorrect" means that username/password combination is invalid.

Here's a script I have used to FTP a database export file from server to local PC.

BAZA.BAT - MS Windows (OK, DOS) batch script: go to F disk's root directory and use the "bftp" file while connecting to the AL2110 server
F:
cd F:\
ftp -s:c:\bftp al2110

BFTP file (has no extension in this example):
- provide username (some_user)
- provide password (some_pwd)
- go to the root directory of the disk5 (OpenVMS, if you are that curious)
- change to the local directory (lcd)
- change to BINARY mode
- get all "baza*.dmp" files from server's disk5 root directory to the local F disk's root directory
- bye bye
some_user
some_pwd
cd disk5:[000000]
lcd
prompt
binary
mget baza*.dmp
bye

Transfer was being started by running the "baza.bat" DOS batch file.

I hope that you'll manage to adjust such a script(s) to get your job done.
Re: Host command Help? [message #348235 is a reply to message #347568] Tue, 16 September 2008 03:09 Go to previous messageGo to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Thank it was working fine.

kanish
Re: Host command Help? [message #348283 is a reply to message #347568] Tue, 16 September 2008 05:37 Go to previous messageGo to next message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Hi
One More issue that is

I have form with a button it execute the the follow batch file

 c:
  ftp -s:c:\sam1 ipaddress


sam1 file contain

  myuser
  mypass
  delete myfile
  put myfile



when i run form it is not transfering the file.

But When execute the batch file directly, which is transfering
what may be reason?

Please help to solve this issue.
Re: Host command Help? [message #348292 is a reply to message #348283] Tue, 16 September 2008 06:26 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Any (error) message?

What happens if you modify the batch file as
c:
cd c:\       --> add this line
ftp -s:c:\sam1 ipaddress
Re: Host command Help? [message #348506 is a reply to message #347568] Wed, 17 September 2008 01:04 Go to previous message
mm_kanish05
Messages: 487
Registered: January 2007
Location: Chennai
Senior Member

Thanks,

It works fine.

Now Is it possible telnet connectivity via batchfile
without promoting user/pass from windows to unix

Thanks in advance.

kanish
Previous Topic: Manually Generating number
Next Topic: Size limit on image file?
Goto Forum:
  


Current Time: Wed Dec 07 08:29:43 CST 2016

Total time taken to generate the page: 0.21281 seconds