touch for windows

Written by sdclee on January 3, 2012 Categories: Code, Software

A little while ago I needed to use a ‘flag file’ mechanism in a windows command script, so I nipped out for a quick search for an executable version of touch for windows. Whilst I could find the program in a variety of locations, none of them appeared to have the ability to create a file if it doesn’t already exist. Now this is no great hassle but annoying to someone with my obsessions, so rather than my creating a file and then ‘touching’ it (two steps), I cracked open the excellent tiny c compiler (tcc) and spent a fair number of hours removing the rust from my c coding skills.

After the last 12 years of perl and php it certainly was an odd feeling flying the c compiler again, but great fun (whilst watching the television as a neat blaming mechanism for why it was taking so long to write). So if you find yourself  in need of the executable or the source code, pay a visit to the repository on github.

Please note that 95% of all my programming is bespoke for clients and therefore doesn’t appear in publicly accessible repos, but if there’s anything you might want by way of a short utility (bash, sed, awk, php, perl, windows cmd), add a comment to any of the postings here.

1 Comment on touch for windows

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *