06-24-2013 06:58 PM
What's the best way to check that a file exists?
I notice there is no built in check for this, so what do most people do?
Is it best to just execute "if not exists" and exit with a non zero code?
Example:
if not exist C:\windows\regedit.exe exit /b 1
Solved! Go to Solution.
06-25-2013 03:17 AM
Yes, there is no built-in function so it's best to use scripting of some form, either VBS and use the execute windows script activity or use powershell and use the execute powershell activity.
I do this for a lot of stuff that is not already coded in CPO and works fine.
06-25-2013 03:17 AM
Yes, there is no built-in function so it's best to use scripting of some form, either VBS and use the execute windows script activity or use powershell and use the execute powershell activity.
I do this for a lot of stuff that is not already coded in CPO and works fine.
06-30-2013 05:27 PM
Thanks Chris - the cmd I posted in my original message seems to be working OK.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide