If statement: Check if folder does NOT exist.
Posted: Tue Nov 19, 2013 3:51 pm
Looking to write a small if statement to see if a folder exists, and if it does not go ahead a create it. One caveat is that the foldername contains a variable. Here's what I got so far but it isn't working. Would appreciate a little assistance...
Code: Select all
<timestamp version="1.0">
<format outputVariable="currentDate" pattern="yyyyMMdd" />
</timestamp>
<if label="if: folder exists" condition="${FileInfo('/opt/Linoma_Software/GoAnywhere_Services/share/webdocs/MDT/Datamail/Archived/${currentDate}'):exists == false}" logLevel="debug">
<mkdir dir="/opt/Linoma_Software/GoAnywhere_Services/share/webdocs/MDT/Datamail/Archived/${currentDate}" version="1.0" />
</if>