Reputation: 63
I am having some trouble with checking if a folder in the svn repository exists or not using a batch file.
Using a batch file, I see that in order to check if a folder exists I can do that using :
if exist c:/folder/ ( echo folder found )
if not exist c:/folder/ ( echo folder not found)
Using the same concept, but replacing the drive location to a svn repository location doesn't work.
if exist svn://repository_location ( echo folder found)
if not exist svn://repository_location ( echo folder not found )
Each time, I run the code, it gives back the error
folder not found
Can anyone help me figure out some way to use the svn links to check for file locations?
Upvotes: 1
Views: 1328
Reputation: 30662
cmd.exe does not know anything about Subversion and the location svn://repository_location. Therefore, it will always output "folder not found" because there is no folder with name svn://repository_location on local filesystem.
You should use Subversion command-line tools (svn.exe, svnlook.exe) or use its APIs to complete the task you have. There are also bindings for Python, C#, Perl which should help you.
Upvotes: 4