The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Pattern Matching Count Urgent krabu Shell Programming and Scripting 6 07-31-2008 07:23 PM
Awk to count matching IP address new_buddy Shell Programming and Scripting 3 05-28-2008 06:24 AM
removing the extension from all filenames in a folder johnmcclintock UNIX for Dummies Questions & Answers 5 05-21-2008 09:23 AM
command to get count in unzipped folder arunkumar_mca UNIX for Dummies Questions & Answers 4 10-17-2007 03:19 PM
finding duplicate files by size and finding pattern matching and its count jerome Sukumar Shell Programming and Scripting 2 12-01-2006 04:20 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-02-2009
tententen tententen is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 17
Count matching filenames in a folder

Hi all,

I have 4 files for example named

abc01012009.txt
abc02012009.txt
abc03012009.txt
abc04012009.txt

in a folder. I would like to firstly backup the latest file available, in this case, the latest date available, abc04012009.txt to its subfolder named backup, and then rename the file to abc.txt, so that leaves me with

abc01012009.txt
abc02012009.txt
abc03012009.txt
abc.txt

then, it will run the commands I will set, and once the commands are completed, it go through the list of files again, and loop my commands, until no more files named abcDDMMYYYY.txt are available.Can someone please help, thank you so much!.

rgds
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0