The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Dont want to change the codepage of a unicode file shibajighosh AIX 0 05-12-2008 09:21 PM
command << EOF(dont want to call other script) user_prady Shell Programming and Scripting 4 11-15-2007 01:19 AM
Retrieving the full command trocadero HP-UX 1 05-19-2007 04:14 AM
Getting the process full command line fredy AIX 0 12-21-2006 12:06 AM
Full command line sun 5.10 fredy UNIX for Advanced & Expert Users 4 11-09-2006 03:32 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 05-11-2007
Registered User
 

Join Date: May 2007
Posts: 2
mv command if you dont know the full name of the file

Hi all.

I have a problem renaming a file.

It is called "data_200711051002.csv" (for example) and I want to rename it automatically to "data.csv" in a routine in a program named Ascential.

Those numbers are a time stamp, so every time the file is loaded into the server, they will change.

I have tried this:

"mv /folder1/folder2/data*.csv /folder1/folder2/data.csv"

But it does not work, as there is an error: it does not find the file (there will be only one file at a time).

Does anyone know what do I have to do to rename a file without knowing the full name?

Thanks!!!
Reply With Quote
Forum Sponsor
  #2  
Old 05-11-2007
Registered User
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,397
If there is only one file, your command should work. Can you show the error?
Reply With Quote
  #3  
Old 05-11-2007
Registered User
 

Join Date: May 2007
Posts: 2
Ok.

It works. I was using a wrong path...

Thanks!!!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:21 PM.


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

Content Relevant URLs by vBSEO 3.2.0