How to update folder name after every 2 month


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to update folder name after every 2 month
# 1  
Old 10-20-2011
How to update folder name after every 2 month

Hello Guru,

I need a logic which can rename my folder after every two month with current time stamp...

ex:
if folder name is
My_Folder_20102011

then after two month it should be
My_Folder_20122011

its there any way to get it, please share. Smilie

Thanks
# 2  
Old 10-20-2011
Code:
 
mv My_Folder_20102011 My_Folder_$(date +%d%m%Y)

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies

2. Shell Programming and Scripting

Month folder

hi Need an help on this. I need to create a folder for previous month. i can get the current month folder. Eg March month as Mar2016 but i need Feb2016 mkdir `date +%b%Y` Mar2016 But need Feb2016, can any 1 help me on this (3 Replies)
Discussion started by: rajasingam
3 Replies

3. Shell Programming and Scripting

Need last month files after 10th of every month

Hi, I need all file names in a folder which has date >= 10th of last month, Example : files in folder AUTO_F1_20140610.TXT BUTO_F1_20140616.TXT CUTO_F1_20140603.TXT FA_AUTO_06012014.TXT LA_AUTO_06112014.TXT MA_AUTO_06212014.TXT ZA_AUTO_06232014.TXT Output: AUTO_F1_20140610.TXT... (9 Replies)
Discussion started by: nani1984
9 Replies

4. Shell Programming and Scripting

How to add decimal month to some month in sql, php, perl, bash, sh?

Hello, i`m looking for some way to add to some date an partial number of months, for example to 2015y 02m 27d + 2,54m i need to write this script in php or bash or sh or mysql or perl in normal time o unix time i`m asking or there are any simple way to add partial number of month to some... (14 Replies)
Discussion started by: bacarrdy
14 Replies

5. Shell Programming and Scripting

Convert From Month Number to Month Name

Hi, I have a script that accepts an input date from the user in yyyy-mm-dd format. I need to get the mm-dd part and convert it to month name. example: 2011-11-15 I want that to become "Nov 15" I don't have the GNU date, I am using an AIX os. Thanks. (1 Reply)
Discussion started by: erin00
1 Replies

6. Shell Programming and Scripting

Script to counting a specific word in a logfile on each day of this month, last month etc

Hello All, I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer. Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
5 Replies

7. Shell Programming and Scripting

Folder Update Script

Hi, I would like to write a script for send out a notification once a folder has been updated or receive a file. I have folder with name SOURCE,this folder receiving source files from third party vendor in 24hrs.now i want a notification mail once the folder updated with some thing or once... (2 Replies)
Discussion started by: koti_rama
2 Replies

8. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies

9. Shell Programming and Scripting

File Management: How do I move all JPGS in a folder structure to a single folder?

This is the file structure: DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies

10. Shell Programming and Scripting

How to update copyright header on a folder

Hi, I have multiple shell scripts in diffrent folders on server. Most of them contain copyright information like on the third line * Copyright © 2004, 2005, My Inc. All rights reserved. I need to change these headers to * Copyright © 2003, 2009, My Inc. All rights reserved. ... (2 Replies)
Discussion started by: neeto
2 Replies
Login or Register to Ask a Question