Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Administration & Installation

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 16th December 2010, 14:05
Arjit Gupta Arjit Gupta is offline
Junior Member
 
Join Date: Oct 2010
Location: Delhi
Posts: 4
Arjit Gupta is on a distinguished road
Baan: BAAN IV,ERP LN - DB: Oracle - OS: Window XP,Vista
To move file over FTP
Baan: ERP LN 6.1 FP2
DB: Other/Unknown
OS: Windows XP
C/S: None/Unknown

I have to move the file from one server to another through Baan.
I had used run.prog() and it returns 0.through that i executed batch file through which i entered user name and password of another server and path where i have to move the file..but the file is not moving and it is working through command prompt.
kindly give ur suggestion ..how i can move the file..?
Reply With Quote
Sponsored Links
  #2  
Old 16th December 2010, 14:45
bilmaa bilmaa is offline
Member
 
Join Date: Jul 2004
Location: Spain
Posts: 84
bilmaa is on a distinguished road
Baan: baan iv c4 sp20 - DB: oracle 10G - OS: win 2003
Red face ftp functions

You can used ftp functions. for example:

function void main()
{
long ret_val
long connection
long secondconnection
string response(500)

| all next functions return 0 upon success, non-zero on
failure.
| the connection identifier, retrieved during ftp.connect need
to be used in every subsequent call to an ftp function

| provided functionality by ftp deamon varies per platform,
e.g. some commands are not understood, or ascii transfer of files
is not possible
| you have to find out yourself what the ftp daemon provides as
functionality.
| ftp.last.response usually tells a detailed cause for a
problem.

| ftp.init function need to be called before any other ftp
function, otherwise the other ones will fail.
ret_val = ftp.init()
if (ret_val = 0) then
ret_val = ftp.connect("hostname", connection)
endif
if (ret_val = 0) then
ret_val = ftp.login("anonymous","yourmailddress",
connection)
endif

| open a second connection
if (ret_val = 0) then
ret_val = ftp.connect("otherhostname", secondconnection)
endif

if (ret_val = 0) then
ret_val = ftp.last.response(secondconnection, response)
endif

if (ret_val = 0) then
ret_val = ftp.quit(secondconnection)
endif

| errorneous calls (connection is already closed, but bshell
should be able to handle this)
if (ret_val = 0) then
ret_val = ftp.quit(secondconnection)
endif

if (ret_val = 0) then
ret_val = ftp.last.response(secondconnection, response)
endif

if (ret_val = 0) then
| continue with first connection
ret_val = ftp.chdir("pub", connection)
endif

if (ret_val = 0) then
ret_val = ftp.mkdir("test", connection)
endif

| Check file.chmod for available mode flags
if (ret_val = 0) then
ret_val = ftp.chmod(S_IRWXU + S_IRWXG + S_IRWXO, "test",
connection)
endif
if (ret_val = 0) then
ret_val = ftp.last.response(connection, response)
endif

if (ret_val = 0) then
ret_val = ftp.put("${BSE}/tmp/afile", "ftp.bc", FTP_BINARY,
connection)
endif
if (ret_val = 0) then
ret_val = ftp.last.response(connection, response)
endif

| retrieves dir/nlst from remote site and write output to file
(first argument)
| note that current dir may be differ from user to user.
if (ret_val = 0) then
ret_val = ftp.nlst("dir.nlst", ".", connection)
endif
if (ret_val = 0) then
ret_val = ftp.dir("dir.dir", ".", connection)
endif

| when transferred from windows to unix, and now getting it in
ascii mode, you will get a cr/lf translated file
if (ret_val = 0) then
ret_val = ftp.get("${BSE}/tmp/afile.ftped", "afile",
FTP_ASCII, connection)
endif
if (ret_val = 0) then
ret_val = ftp.last.response(connection, response)
endif

if (ret_val = 0) then
ret_val = ftp.rename("afile", "afile.renamed", connection)
endif
if (ret_val = 0) then
ret_val = ftp.last.response(connection, response)
endif
if (ret_val = 0) then
ret_val = ftp.del("afile.renamed", connection)
endif
if (ret_val = 0) then
ret_val = ftp.last.response(connection, response)
endif

if (ret_val = 0) then
ret_val = ftp.rmdir("test", connection)
endif
if (ret_val = 0) then
ret_val = ftp.last.response(connection, response)
endif

| errorneous call
if (ret_val = 0) then
ret_val = ftp.rmdir("notexistingdir", connection)
endif
if (ret_val = 0) then
ret_val = ftp.last.response(connection, response)
endif

if (ret_val = 0) then
ret_val = ftp.chdir("..", connection)
endif
if (ret_val = 0) then
ret_val = ftp.last.response(connection, response)
endif

| after quit, you need to setup a new connection.
if (ret_val = 0) then
ret_val = ftp.quit(connection)
endif
}
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Undocumented Functions & Variables george7a Tools Development 81 30th September 2015 11:35
e-mail or FTP a file. mrreds Tools Development 3 6th August 2009 21:18
Incomplete FTP of file / UNIX shell script & run.prog BaanInOhio Tools Development 7 11th November 2008 13:44
bshell received SIGTERM manojsharma Tools Development 11 5th June 2008 09:22


All times are GMT +2. The time now is 06:00.


©2001-2017 - Baanboard.com - Baanforums.com