Using Coldfusion to Help Generate Batch Files
From time to time I have to do server related tasks. I do not like to, because it takes away from Coldfusion programming time. I try to incorporate CF as much as possible. Here are a couple examples: 1. I needed to create a script that would backup MySQL databases. I created a Coldfusion script that would extract all the databases using SHOW DATABASES;, looped through and created the mysqladmin line to allow the databases to be backed up to their own file. I then used another program to create an exe out of the batch file so you cannot see the password. 2. We had to switch up servers. I used Coldfusion to hit every one of our websites 1 time on the new server so website logs were generated. I then used Coldfusion to match up the directory structures and was able to create the batch file to transfer over the old log files into the new directory. For those of you who do not know, IIS created a W3SVC directory for each domain. We used IIS Export to transfer all the domains, but it didn't work as planned. So CF was to the rescue and allowed me to do something automatically that would have been a nightmare to have to do by hand. These two examples were the most recent. Coldfusion can take the repetition out of creating batch files. I have used a list before to generate batch files so it's not just limited to database related items either.
http://www.cfedge.com/trackback.cfm?12A11FD6-A6DF-F607-A10F13CF42B2E207



There are no comments for this entry.
[Add Comment]