This is the code I have:
cd %PROJECTROOTLOCAL%\Installation\AmazonS3\AmazonS3\
del /s /f /q *.*
What I want to do is delete all files in the Installation\AmazonS3\AmazonS3 directory. However what if the directory doesn’t exist? Well I get this error on the first line:
The system cannot find the path specified.
And the current directory isn’t changed. Which leaves me at the root of the my project. Which means that the second command deletes all the files in my project. Not good. The fix is this:
mkdir %PROJECTROOTLOCAL%\Installation\AmazonS3\AmazonS3\
cd %PROJECTROOTLOCAL%\Installation\AmazonS3\AmazonS3\
del /s /f /q *.*
Or is there something better?
{6230289B-5BEE-409e-932A-2F01FA407A92}
1 comments: