> Thanks for the update. I remember one of your tools being able to show 
> the directory path, but not in separate pieces ( I wanted to convert 
> path to Linux-style to satisfy Syslinux.cfg requirements for the 
> Syslinux installer).
>
> Preferably just the directory name, without any
> - filename
> - directory/directories above it
> - slashes/backslashes
> - colon
> - driveletter
>
> so C:\TEST\REMASTER\DOS\ would return DOS if executed from that 
> directory. If going one dir up, it would return the string REMASTER
> (etc..).  End result is something alike:
>
> @echo off
> set /E output=tool.exe /basename
> set string=%output%
> cd..
> set /E output=tool.exe /basename
> set string=%output%/%string%
> set string=/%string%
> echo Unix-path for %_CWD% is %string% (without driveletter)
I'm not quite sure whether i got your point correctly, but have you had 
a look at FNTOOL? It's kind of a superset of tools like "dirname" and 
"basename". E.g. "FNTOOL /B C:\TEST\REMASTER\DOS" would return just "DOS".

And, as often, there is more than one way to get a job done. An 
alternative could be like this: "cd | tr '\\' '/' | pipeset /C: = 
unix-path". All three utilities: "FNTOOL", "TR" and "PIPESET" are part 
of the DOSUTILS package.



------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to