Search found 4 matches
- 12 Feb 2008 10:07
- Forum: DOS Batch Forum
- Topic: set command behavior and auto creating path
- Replies: 6
- Views: 12731
Re: Split path
Hi, reference at FOR /? splitPath.bat echo Path=%~dp1 echo filename=%~nx1 Use it like splitPath "c:\tmp\tmp1 add\file 22.exxt" Jan Erik many thanks Jeb, It looks simple but works perfectly. You must be top of the best of DOS gurus. I am just a new learner but loves script. Can you introdu...
- 09 Feb 2008 07:00
- Forum: DOS Batch Forum
- Topic: set command behavior and auto creating path
- Replies: 6
- Views: 12731
- 09 Feb 2008 06:38
- Forum: DOS Batch Forum
- Topic: set command behavior and auto creating path
- Replies: 6
- Views: 12731
DoesItHelp,
Yes, it helps.
Thanks,
McR
DosItHelp wrote:
Your problem is an extra space, the following two lines are not the same:Code: Select all
set fileLocate = %fileLocate%.ext
set fileLocate= %fileLocate%.ext
DOS IT HELP?
Yes, it helps.
Thanks,
McR
- 03 Feb 2008 09:47
- Forum: DOS Batch Forum
- Topic: set command behavior and auto creating path
- Replies: 6
- Views: 12731
set command behavior and auto creating path
Hi, I do not know why the set command inside () won't show outside of its (). My test code is below: SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDELAYEDEXPANSION :loop set fileLocate= set /p fileLocate= Enter the file name: if "%fileLocate%" EQU "" goto loop if /i "%fileLocate:...