Posts Tagged ‘script’
DOS: Get the directory name from a file path
If you need to write a DOS batch file that takes a file path as an input parameter and needs to do something to other files in the same directory as the input file then you’ll find there is no easy way to get the file’s directory name into a variable. You could pass in the directory name as a separate parameter but that seems like [...]
Converting file extensions to lower case
Recently I needed to convert a large number of photo file extensions to lower case. Doing this manually would take ages and wouldn’t be a fun job. I wrote a quick batch file to look through all the sub-directories from the one it is executed from and change selected file extensions to lower case. To use this script place the below code in [...]
Batch processing photos with DOS and ImageMagick
For my recent walking project I knew I was going to be taking lots of photos. I wanted a DOS script which would batch process the JPEG photos from my camera into the 'full sized images' (which are much smaller than the raw camera images), and the poloroid-like thumbnails. The excellent ImageMagick tool provides a way to generate poloroid-like [...]
Using a common form mail script for multiple websites
I run a number of different websites. Most of them have a contact page which is powered by a form mail script. Until recently each of these websites used an almost identical copy of the same form mail script - I use PHPFormMail but you could adapt this solution for other form mail scripts. Each contact us page has very similar HTML in it. I wanted [...]
FTP uploading a directory of files using perl
Here is a simple script to upload the files which are in a particular directory. I use something similar to automate the file uploading for my tube walking blog. Whenever I take photos for the blog I put them into a directory with the current date as the directory name. So I have a structure like [...]
Backup / restore of last modified and created file time attributes on Windows
Last month I found that I needed to be able to backup and restore the last modified and created file times of a load of files in Windows XP. This is probably a bit of an obscure thing to need to do so naturally I couldn't find any existing tools to do it. I've therefore made a Perl script to allow this to be done. Just so you are clear, this [...]









