Skip to main content

[Migrated content. Thread originally posted on 20 January 2012]

Hi!

I currently need a way to be able to see if a directory exists out on the server before a file is created.
I cannot use the DIR command with "SYSTEM", DIR always returns a a exit code of 0.

Any suggestions??

Thanks!

[Migrated content. Thread originally posted on 20 January 2012]

Hi!

I currently need a way to be able to see if a directory exists out on the server before a file is created.
I cannot use the DIR command with "SYSTEM", DIR always returns a a exit code of 0.

Any suggestions??

Thanks!

IF EXIST OUT.txt DEL OUT.txt
IF EXIST [dir] ECHO "dir exists" > OUT.txt