Arthur Fuller
fuller.artful at gmail.com
Tue Mar 18 20:09:02 CDT 2008
If exist is what you need. Here is an example: *IF EXIST c:\autoexec.bat echo Yupper *That is a simple example. For "echo Yupper", you can substitute something like "copy x:\my.dll %windir%/my.dll". You could also get fancy, create a label in the command file (e.g. a line that begins with a colon immediately followed by a label) and jump to it, like this: *IF EXIST c:\autoexec.bat goto mylabel echo Nosireee exit :mylabel **echo Yupper exit * hth, Arthur (See? There are some advantages to being an old timer.) On 3/18/08, Darren D <darren at activebilling.com.au> wrote: > > Hi All > > > > Apologies for the Off Topic post - moderators let me know if this is too > much of > a stretch :-) > > I am calling a batch file that does many many things > > One of the things it does is 'merge' a file we have to a file the OS > should have > > Sometimes the OS does not have this file So. > > I want to know the syntax in a batch file to test the existence of a file > and if > it exists to "X" if it doesn't do "Y" > > > > > > Many thanks > > > > DD > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >