The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Rename a file name Aswarth Shell Programming and Scripting 0 06-04-2008 11:18 AM
rename the file in batch reldb UNIX for Advanced & Expert Users 7 01-14-2008 02:43 PM
Not able to rename file MANISH KU Shell Programming and Scripting 2 06-27-2007 01:07 AM
File rename redlotus72 UNIX for Dummies Questions & Answers 1 03-09-2006 07:52 AM
Help with multiple file rename - change case of part of file name steve7 UNIX for Dummies Questions & Answers 7 06-30-2005 10:41 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-27-2005
Registered User
 

Join Date: Sep 2005
Posts: 74
Stumble this Post!
how to rename a file before and after a ftp?

I doin a script in sh.
For example:
i have this code here whereby $5 is a text file. eg file.txt. I wanna rename it to file.txt.tmp. so i use this code below which is correct.
put $5 $5.tmp

But when the ftp transfer is complete i need to rename the file back to $5 which is file.txt.

How do i do that?
izzit use
mv $5.tmp $5?
i got problem with that...

Thanks in advance for those who help.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-28-2005
Registered User
 

Join Date: May 2005
Location: Scotland
Posts: 28
Stumble this Post!
remote file

Could you post the script you are using so i can get a better understanding what you are doing ?
Reply With Quote
  #3 (permalink)  
Old 10-28-2005
Registered User
 

Join Date: Oct 2005
Posts: 22
Stumble this Post!
use the ftp `rename` command
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0