Sign in to follow this  
Followers 0
coptang

Grandfather, father, Son

4 posts in this topic

#1 ·  Posted (edited)

My first autoit script so be gentle, it's not had a lot of testing yet either so please report any bugs you find:

gfs script (v0.2.1)

gfs compiled exe (v0.2.1)

Script version:

0.2

Script Function:

Grandfather, father, son file renaming

Description:

Will rename the specified input file by adding the day of the week to its name. If the day is a friday

the number of the friday of the month will be added. If it is friday 4 the month will also be added.

Storing just 21 files will give you a years worth of backups. You will always have the last week, a backup

for each of the last 4 weeks and a backup per month for the last 12 months.

Examples:

Monday: file.zip -> Mon-file.zip

Tuesday: file.zip -> Tue-file.zip

1st Friday of month: file.zip -> Fri-1-file.zip

2nd Friday of month: file.zip -> Fri-2-file.zip

4th Friday of January: file.zip -> Fri-4-1-file.zip

4th Friday of February: file.zip -> Fri-4-2-file.zip

Usage:

Call script once without command line arguments to generate a default gfs.ini file in current directory

Call script with a file name as the first argument to rename that file according to the current date

Call script with an ini file name as the second command line argument to use a specific ini file

Using the ini file from the current directory:

gfs.exe C:\files\file_to_be_renamed.zip

Specifying an ini file:

gfs.exe C:\files\file_to_be_renamed.zip C:\config\gfs.ini

EDIT: Slightly updated as friday 4 calculation was off

Edited by coptang

Share this post


Link to post
Share on other sites



@coptang, the idea is pretty interesting. I gives me some ideas. Thx

Cheers.. :whistle:

Share this post


Link to post
Share on other sites

lol, small place this internet :whistle:

Share this post


Link to post
Share on other sites

lol, small place this internet :whistle:

I don't get that^. What is that supposed to mean?

Good job on the program btw.


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0