05-12-2011 8:25 AM
Hello All,
I want to copy a PDF file that resides in a Unix directory, say /usr/home/file.pdf, to a shared windows directory, say
itm\Copy\PDF\. How can I achieve this?
The size of file may be varying, also are there complications due to difference in line feed format?
Thanks for your help.
05-12-2011 9:55 AM
For Shell you can use something like this, uf you can connect in ftp to windows machine (otherwise, delete ftp command):
#! /bin/sh
#
SRC_DIR=/usr/home/
SRC_FILENAME=file.pdf
TRG_HOSTNAME=<hostname>
TRG_DIR=
itm\Copy\PDF\
TRG_FILENAME=file.pdf
cd $SRC_DIR
ftp -n -v <<%%EOF%%
open TRG_HOSTNAME
user <user> <pass>
cd $TRG_DIR
put $SRC_FILENAME $TRG_FILENAME
bye
%%EOF%%
05-12-2011 8:59 AM
You have to write a unix command ( must contain code which moves the file from one place to other ) and execute it using function SXPG_COMMAND_EXECUTE. Please search the forum for more details.
basis people having knowledge of UNIX can easily write this
05-12-2011 9:55 AM
For Shell you can use something like this, uf you can connect in ftp to windows machine (otherwise, delete ftp command):
#! /bin/sh
#
SRC_DIR=/usr/home/
SRC_FILENAME=file.pdf
TRG_HOSTNAME=<hostname>
TRG_DIR=
itm\Copy\PDF\
TRG_FILENAME=file.pdf
cd $SRC_DIR
ftp -n -v <<%%EOF%%
open TRG_HOSTNAME
user <user> <pass>
cd $TRG_DIR
put $SRC_FILENAME $TRG_FILENAME
bye
%%EOF%%
05-12-2011 11:40 AM
05-12-2011 11:46 AM
Yes. You have to write a unix command externally and call it thorugh the function in your report.
check