COKEDUDEUSF Posted August 23, 2008 Share Posted August 23, 2008 Can someone tell me what %~dpn0 means? I've seen it in a couple of cmd files. Link to comment Share on other sites More sharing options...
jaclaz Posted August 23, 2008 Share Posted August 23, 2008 Read here:http://www.robvanderwoude.com/ntfor.html"%0" is the parameter zero of a batch, i.e. the name of the batch.d=drivep=pathn=namePlease note that whilst %0 may or may not comprehend the file extension (depending on how it was called), %~dpn0 does NOT include the extension anyway (whilst %~dpnx0 does).jaclaz Link to comment Share on other sites More sharing options...
Martin H Posted August 23, 2008 Share Posted August 23, 2008 The folder with the apps in the example i gave you where '\$OEM$\RunOnceEx\' and then the path to the apps in RunOnceEx.cmd is then '%~dpn0\' which expands to 'E:\$OEM$\RunOnceEx\' if the CD drive where E:...If the folder with the apps instead where e.g. '$OEM$\Apps\', then the path would be: '%~dp0\Apps\'...Check out jaclaz's links... Link to comment Share on other sites More sharing options...
COKEDUDEUSF Posted August 23, 2008 Author Share Posted August 23, 2008 The folder with the apps in the example i gave you where '\$OEM$\RunOnceEx\' and then the path to the apps in RunOnceEx.cmd is then '%~dpn0\' which expands to 'E:\$OEM$\RunOnceEx\' if the CD drive where E:...If the folder with the apps instead where e.g. '$OEM$\Apps\', then the path would be: '%~dp0\Apps\'...Check out jaclaz's links...Ohhh. Catching on slowly. Thx for explaining. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now