BoardBabe Posted August 8, 2005 Share Posted August 8, 2005 How do i through command test two variables?I need it for my cleanup command as follows.If Programfiles\Photoshop or Programfiles\Illustrator exists and dir TEST not existthen MKDIR TEST.To lay it down simply what I want Is there a way to do this? Link to comment Share on other sites More sharing options...
evilvoice Posted August 8, 2005 Share Posted August 8, 2005 (edited) why not just use 2 commands...if exist photoshop md test...if exist illustrator md test...you say or, you dont say both have to exist...and with md, it wont overwrite all your files, itll just error saying dir already exists, so no big deal there.PS..Im gonna assume this ties in with your post in the Applications subforum...why not keep everything in one place...it makes it easier if everyone has all the info needed. Edited August 8, 2005 by evilvoice Link to comment Share on other sites More sharing options...
BoardBabe Posted August 8, 2005 Author Share Posted August 8, 2005 (edited) True that, it does link to this topic. Put it here as it was more of a unattend question, but sure, could have continued on. Anyways...Sure there are a couple of ways to solve this, but as im also trying to learn while I make my CD, it's good to know if something like the above is even possible. Now a solution would as you say be something like this.@echo offif exist "%ProgramFiles%\Adobe\Adobe Photoshop CS2" mkdir "%UserProfile%\My documents\Updater"if exist "%ProgramFiles%\Adobe\Adobe Illustrator CS2" if not exist "%UserProfile%\My documents\Updater" mkdir "%UserProfile%\My documents\Updater"if exist "%UserProfile%\My documents\Updater" ATTRIB +H "%UserProfile%\My documents\Updater"exitThat way no erros will occure. Edited August 8, 2005 by BoardBabe Link to comment Share on other sites More sharing options...
Yzöwl Posted August 8, 2005 Share Posted August 8, 2005 From the code you've given, this should set you on the right track.if exist "%ProgramFiles%\Adobe\Adobe*CS2" ( if not exist "%UserProfile%\My Documents\Updater" ( md "%UserProfile%\My Documents\Updater" ) attrib +h "%UserProfile%\My Documents\Updater") Link to comment Share on other sites More sharing options...
BoardBabe Posted August 8, 2005 Author Share Posted August 8, 2005 P E R F E C T Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now