Re: Extracting last Folder Name from complete path
From: andreas kässens (andreas.kaessens_at_simul.de)
Date: 12/02/04
- Next message: Tom Lavedas: "Re: Extracting last Folder Name from complete path"
- Previous message: Michael Bednarek: "Re: Extracting last Folder Name from complete path"
- In reply to: Michael Bednarek: "Re: Extracting last Folder Name from complete path"
- Next in thread: Tom Lavedas: "Re: Extracting last Folder Name from complete path"
- Reply: Tom Lavedas: "Re: Extracting last Folder Name from complete path"
- Reply: Jerold Schulman: "Re: Re: Extracting last Folder Name from complete path"
- Reply: Matthias Tacke: "Re: Extracting last Folder Name from complete path"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Dec 2004 12:34:46 +0100
"Michael Bednarek" wrote
> Using 4NT/4DOS, I do this frequently thus:
> ECHO %@WORD["\",-0,C:\temp\ExtendedDB]
>
> 4NT is a commercial product, 4DOS is free
Thanks a lot for your answer! But I have to use the standard Windows xp
commands, which do not have such function. So I tried the following batch:
@echo off
set pfad=D:\Arbeit\PROJEKTE\ATARI 2
for /f "delims=\ tokens=4" %%a in ("@echo %pfad%") do @echo %%a
Unfortunately there seems to be no way to address the last token in general
("tokens=-1" does not work). The only way I can think of, is another for
loop, which counts the "\" in the variing path and replace it with the
tokens value.
This seems to be far too much effort for such a simple task, doesn't it?
Andreas
- Next message: Tom Lavedas: "Re: Extracting last Folder Name from complete path"
- Previous message: Michael Bednarek: "Re: Extracting last Folder Name from complete path"
- In reply to: Michael Bednarek: "Re: Extracting last Folder Name from complete path"
- Next in thread: Tom Lavedas: "Re: Extracting last Folder Name from complete path"
- Reply: Tom Lavedas: "Re: Extracting last Folder Name from complete path"
- Reply: Jerold Schulman: "Re: Re: Extracting last Folder Name from complete path"
- Reply: Matthias Tacke: "Re: Extracting last Folder Name from complete path"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|