Search found 2 matches

by Eximious
22 May 2013 15:18
Forum: DOS Batch Forum
Topic: Help with Remove %~dp0" from the string variable %~f0
Replies: 2
Views: 3200

Re: Help with Remove %~dp0" from the string variable %~f0

Thank you, Antonio, for your reply.
:mrgreen: Brilliant ! :mrgreen:
I would never have constructed !str:%~dp0=! -- Perfect Solution, as well as %%str:%~dp0=%%

and ... %~nx0 ... well, I used %~n0 , %~x0 , and %~dp0 ... but %~nx0 ? :oops: Thanks!
by Eximious
22 May 2013 09:41
Forum: DOS Batch Forum
Topic: Help with Remove %~dp0" from the string variable %~f0
Replies: 2
Views: 3200

Help with Remove %~dp0" from the string variable %~f0

I am trying to isolate a batch file name (something.bat) by removing %~dp0 C:\Users\Public\Batch Files\ from %~f0 C:\Users\Public\Batch Files\something.bat Unsuccessful: set str=%~f0 :: Yields C:\Users\Public\Batch Files\ set str=%str:%~dp0=% :: Yields ~dp0= or set str=%str:%%~dp0=% :: Yields C:\Use...