Search found 4 matches

by Macarong
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...
by Macarong
09 Feb 2008 07:00
Forum: DOS Batch Forum
Topic: set command behavior and auto creating path
Replies: 6
Views: 12731

Hi Macarong, Btw, does anyone has a code to create a path in case of the path input does not exist? I suppose you want to create a path "c:\temp\myPath\mySrc" if it is not exists. you can simple use md \temp\myPath\mySrc if the path, it will result with an error, but that can be ignored. ...
by Macarong
09 Feb 2008 06:38
Forum: DOS Batch Forum
Topic: set command behavior and auto creating path
Replies: 6
Views: 12731

DoesItHelp,
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? :wink:


Yes, it helps.
Thanks,
McR :D
by Macarong
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:...