| |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Page Last Updated: 21/02/2010
A useful technique is to check for the existence of a file or directory. You can then set actions on the result. This could be copying an update across, running an another application or just recording that something is installed. This can be achieved using the built in command line tools, as per the same script below. In both examples the script will move on to the ":next" if the file or directory is found. You could change the "if exist" to "if not exist" if you want the script to react to something being missing as an alternative. Checking for a file In this example, the script is checking for a file called "content.txt" in the directory "example". Checking for a Directory This sample is checking for a directory called "content" which is a sub directory of "example" About this site This information originally started life as a page on amset.info, our community assistance site. However that site is targeted at Microsoft Exchange server, as Sembee Ltd. is a Microsoft Exchange consultancy. Therefore it was moved to its own domain in early 2010. Traffic from amset.info is directed here. Other sites that are owned and operated by Sembee Ltd include kbsearch.info, certificatesforexchange.com, dosprompt.info, office-recovery.info, wuauclt.info, blog.sembee.co.uk, exbpa.com and amset.info.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||