how to judge whether a path is relative path or absolute path

F

foxidrive

but how could i analyze the path character by character? for loop
seems could only process token by token

@echo off
set var=%1
echo %var%|find ":">nul&& echo path is absolute
echo %var%|findstr /r "^\\.*" >nul&& echo path is absolute
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top