1834804 Members
2995 Online
110070 Solutions
New Discussion

transfer file from PC

 
SOLVED
Go to solution
juno2
Super Advisor

transfer file from PC


How to set a schedule job to get the file from UNIX to pc :
My case like this:
there are some files on the UNIX system /home/edp , I want to set a schedule job to get this file from UNIX to pc , and then delete the files on UNIX.
what command can do this in PC side to get and delete files ? thx.
6 REPLIES 6
Robert-Jan Goossens
Honored Contributor
Solution

Re: transfer file from PC

Hi,

On your pc you will need a ftp-server and winat or wincron.

Take a look at next link.

http://www.wincron.co.uk/

You can also take a look at samba and mount a unix filesystem on your pc.

Hope it gives you some idears.

Robert-Jan.
Stefan Farrelly
Honored Contributor

Re: transfer file from PC

You need some sort of batch scheduler. Windows 2000 comes with one automatically - you can run it from Control Panel -> Scheduled Tasks -> Add a new Task
then select FTP for Windows Explorer
but you need to set it up so that it can ftp automatically to your unix server without requiring a login. This can be done - you will need to write a script to do it on your PC.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Donald Kok
Respected Contributor

Re: transfer file from PC

Hi,
I do a simular job using cifs . It is activated by cron. This is the script I use:

#!/sbin/sh
#this script copys the entire basisgeo to an NT machine

mount -F cifs -o username=dkorf,password=secret rdijsr032:/gisdata /tmp/copy_basisgeo

# test of mount gelukt is
MOUNTED=`mount | grep RDIJSR032 |grep basisgeo | wc -l`

# If source and destination exists then copy

if
[ -d /export/basisgeo/top250 ] -a [ $MOUNTED = 1 ]
then
rm -r /tmp/copy_basisgeo/basisgeo
cp -r /export/basisgeo /tmp/copy_basisgeo
else
echo "problems replicating basisgeo; original or source does not exist." | elm -s basisgeo d.kok@xxx.nl
fi
umount /tmp/copy_basisgeo
My systems are 100% Murphy Compliant. Guaranteed!!!
Michael Steele_2
Honored Contributor

Re: transfer file from PC

We run HP MeasureWare every night and have 2 or 3 crons involved to complete a transfer over to a Windows work station where they are converted into Excel graph files. The windows work station was installed with some ftp server software.

Cron one from HP-UX extracts the MeasureWare information and copies it into a sending directory.

Cron two calls an ftp user account dedicated to the transfers. This account also exists on the work station. It tests for files in the sending directory, starts an ftp session with the user name and password stored in a .netrc file. Pasted below is a link describing this configuration?

Within the .netrc file are embedded ftp commands like put and macdef.

Once the files are on the work station a windows scheduler comes on at an appointed time, like 10 minutes after the cron, and executes a macro that loads the files into excel. The macro was made by just recording the commands as typed.


Here is the ftp .netrc example:

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90696/B2355-90696_top.html&con=/hpux/onlinedocs/B2355-90696/00/00/73-con.html&toc=/hpux/onlinedocs/B2355-90696/00/00/73-toc.html&searchterms=.netrc%7cftp&queryid=20030410-055724
Support Fatherhood - Stop Family Law
Steven E. Protter
Exalted Contributor

Re: transfer file from PC

I would think Secure shell with a public exchange of keys(HP-UX doc attached) would be the most secure way to go.

Software is free:

Secure Shell: a replacement for rcp ftp and telnet that encrypts passwords

http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=T1471AA

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Frank Slootweg
Honored Contributor

Re: transfer file from PC

I use the Scheduled Tasks facility which Stefan mentioned. It runs a .bat file which has a rcp command to get the file from the UNIX system and a rsh command to remove the file from the UNIX system. Note that rsh on Windows is the same as the remsh(1) command on HP-UX.

Please report back if the given suggestions solve(d) your problem.