Apr
25
2009
0

Deleting files based on their Date

If you are perfoming regular automated backups (like you should), You’ll soon find you are running out of space and need to start deleting old backups.

Here is a really simple way to delete files that are more than x days old.

It can easily be worked into a batch file to be run at the same time as an automated backup.


Forfiles -p c:\path -s -m *.* -d -14 -c "cmd /c del /q @path"

Change the *.* to a more specific file mask (eg: backup*.zip). The 14 specifies files older than 14 days, so change this to suit your purposes.

If you want to check what files will be deleted, this will display them:

Forfiles -p c:\path -s -m *.* -d -14 -c "Cmd /C Echo 0x22@Path\@File0x22"

Written by John Burns in: General Randomness, PC Tips |
Apr
16
2009
0

Protect your data before you lose it

Like a lot of other computer users, I seem to have a lot of data which is irreplaceable. Not including music and video (since I have the originals on disk anyway) I’m still pushing almost 1TB (1000GB). This data is made up of 13 years of email history, 10 years worth of digital photos, source code and incremental server backups.

At the end of the day, this data is priceless. I can’t go back and take all my photos, it’d be near impossible to rewrite source code from scratch and a loss server backups would result in a loss of income.

I’ve tended to keep important copies of data at home and on servers but even this isn’t ideal.
(more…)

Written by John Burns in: General Randomness |
Apr
06
2009
0

Cheap Counter for machinery

A friend of mine has been looking for a cheap counter to use in his factory for counting production from machines. He currently uses some of the mechanical counters but these are starting to fail.

Electronic counters cost around £100+ once the price of a suitable power supply is factored in.

I decided a simple electronic tally counter should be relatively easy to modify for automated use and so I started looking for alternatives…
(more…)

Written by John Burns in: General Randomness |