dos batch string manipulation
Hello,
I'm trying to write some dos batch script for manipulating some paths.
I haven't done this in years so I might be rusty.
The path is relative and given from the command line as argument
@echo off
set wpath=%1
@echo.%wpath%
set newpath=%wpath:~0,-4%
@echo.%newpath%
The thing I'm trying to accomplish is to get rid of the extension
script.bat whatever/test.txt
whatever/test.txt
whatever/test
But I'm getting
script.bat whatever/test.txt
whatever/test.txt
<emptyline>
I'm using dosemu-1.4.0.1 and this [1] as a reference.
[1] http://www.dostips.com/DtTipsStringManipulation.php
Regards,
--
Alin Rus
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Console]
[Audio]
[Hams]
[Kernel Newbies]
[Memory]
[Security]
[Netfilter]
[Bugtraq]
[Yosemite Camping]
[Yosemite Photos]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Samba]
[Video 4 Linux]
[Linux Resources]
[Fedora Users]