Operating System - HP-UX
1835064 Members
2662 Online
110073 Solutions
New Discussion

Re: while ftp preventing original files date&time attributes

 
SOLVED
Go to solution
Cem Tugrul
Esteemed Contributor

while ftp preventing original files date&time attributes

Hi Group,i have ux server and want to ftp to w2k server.i have written a script and put it
in cron.the problem is while mget command runs and get files from w2k the files date&time attributes changes to crontab time.
because crontab runs every beginning of hour.
i want to get files and keep their date&time attributes from w2kserver.my script like below;
cd /users/baycom/baycomsrv/gelen/siparis(my Ux dir)
ftp -i myw2kserver<ascii
cd gelen/siparis..(myw2kserver dir)
mget *
close
bye
EOF
Our greatest duty in this life is to help others. And please, if you can't
4 REPLIES 4
Mark Grant
Honored Contributor
Solution

Re: while ftp preventing original files date&time attributes

I don't think you are going to be able to do this. You might be able to get away with it if windows supports "rcp -p" and use that instead of ftp.

Alternatively, you could get your script to read the permissions and modification times on the windows machine, then ftp the files, and then re-set them on the unix box with "chmod" and "touch".
Never preceed any demonstration with anything more predictive than "watch this"
Robert-Jan Goossens_1
Honored Contributor

Re: while ftp preventing original files date&time attributes

Add on on Mark's answer, How about zipping the files before you ftp them. Unzip them again on your locale HPUX server, this will preserve the original date/time stamps.

Kind regards,
Robert-Jan
Cem Tugrul
Esteemed Contributor

Re: while ftp preventing original files date&time attributes

HiRobert &Mark,
Thank's so much for your kind concern
i have checked whether rcp support on W2k or not and yes it supports so my problem seems
to be solved...
Thank's again..

Best Regards,
Our greatest duty in this life is to help others. And please, if you can't
Cem Tugrul
Esteemed Contributor

Re: while ftp preventing original files date&time attributes

Thank's...
Our greatest duty in this life is to help others. And please, if you can't