Solved A syntax question in regards to start %~dp0

March 23, 2012 at 12:06:29
Specs: Windows XP
I saw this statement on another post in this site and I have seen the %~dp0 part before. However, someone used it with start. I am really curious if this would start everything in the current directory, or if using this way has a different result?

mike


See More: A syntax question in regards to start %~dp0

Report •


#1
March 23, 2012 at 14:05:49
✔ Best Answer
%~dp0 must be used inside a batch script since %0 is the batch filename and the modifier %~dp extracts the batch launch directory. So the statement start %~dp0 opens explorer.exe pointing to the batch location.

Report •

#2
March 23, 2012 at 14:37:16
Thanks for the brain check IVO. The other post here, just didn't make sense to me. It was in regards to using this command to prank a friend, and I just didn't see the implication.

mike


Report •
Related Solutions


Ask Question