Unix Programming - to ftping a .tmp file and renaming it to .txt after successful ftp

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2005 > to ftping a .tmp file and renaming it to .txt after successful ftp





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author to ftping a .tmp file and renaming it to .txt after successful ftp
s

2005-04-06, 5:57 pm

Hi,
I am ftping a .tmp file to a third party unix server. This .tmp file
needs to be renamed as .txt file after its been ftp'ed completely.
i kind of now the whole thg except renaming.. shoulld it be a big deal?

joe@invalid.address

2005-04-06, 5:57 pm

"s" <applepie2005@gmail.com> writes:

> I am ftping a .tmp file to a third party unix server. This .tmp file
> needs to be renamed as .txt file after its been ftp'ed completely.
> i kind of now the whole thg except renaming.. shoulld it be a big
> deal?


You should be able to use "rename" to change the name. Your man page
should have this information.

ftp> rename xxx.tmp xxx.dat
350 File exists, ready for destination name
250 RNTO command successful.

The display for your client or server might be different.

Joe
joe@invalid.address

2005-04-06, 5:57 pm

Ulrich Hobelmann <u.hobelmann@web.de> writes:

> s wrote:
>
> The ftp command can name the file, can't it?
> put foo.tmp bla.txt


That's different than what he wants to do. It transfers the file as
bla.txt, which doesn't give the receiving side an indication of when
the transfer is complete. Renaming the file after the transfer does.

Joe
s

2005-04-08, 5:52 pm

I got it. will use rename. That was simple!!!
Thanks guys.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com