Test-Path Woes

by Jan 29, 2014

I have not been keeping up on my training. I come back to powershell and find i am failing miserably. I understand the premise and logic of test path but i can get it to work only occasionally and dont understand why it fails when it does. 

This is going to be the start of my first long script and i am stumbling already.

{

{$PHOTOS = Test-path "C:PHOTOS}

{IF ($PHOTOS -eq "TRUE"){MKDIR "C:TRUE"}

{ELSE{MKDIR "C:FALSE"}

}

 

This does not work This may seem ludicrous but i fail to see why, this will be the beginning of a long discussion i think i appreciate suggestions but id really like explanations. 

 

Thank you before hand if you are interested in discussing this with me.