dos batch string manipulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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
set newpath=%wpath:~0,-4%

The thing I'm trying to accomplish is to get rid of the extension

script.bat whatever/test.txt

But I'm getting

script.bat whatever/test.txt

I'm using dosemu- and this [1] as a reference.


Alin Rus
O< ascii ribbon campaign - stop html mail -
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux