touch /c one;two creates only two

#2
Since the TOUCH help says it works with include lists, and the include list
help shows the semicolon ought to (in this case) be an include list
separator, I think there is a bug as reported.

In my test, I also tried the following, and it created two in the
otherfolder, but did not create one:
touch /c d:\otherfolder\one;two

On Tue, Mar 2, 2010 at 8:32 AM, Christian Albaret <>wrote:


> The command:
> touch /c one;two
> creates only the file two.
>
> Not what I expected, but harmless and inessential.
>
> TCC 11.00.39 Windows XP [Version 5.1.2600]
>
>
>
>
>


--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 

rconn

Administrator
Staff member
May 14, 2008
10,588
97
#3
> The command:
> touch /c one;two
> creates only the file two.
>
> Not what I expected, but harmless and inessential.
Definitely what I would expect -- include lists are intended for retrieving
existing files, not creating new ones.

What's happening is that TOUCH is looking for the file "one", can't find it,
and then looks for the file "two". It can't find that one either, so then
it checks to see if you're trying to create a file, and it duly creates
"two". The "one" is long gone, and indeed never even seen by TOUCH as it
was eaten by the "find file" routine.

But since you can simply remove the ; to get the desired result, it's not
much of a loss ...

Rex Conn
JP Software
 
#4
On Tue, Mar 2, 2010 at 4:46 PM, rconn <> wrote:


> ---Quote---
> > The command:
> > touch /c one;two
> > creates only the file two.
>


> But since you can simply remove the ; to get the desired result, it's not
> much of a loss ...
>
I understand what you're saying about the include list and file creation,
but the way I always use the include list is when I have a folder with
several files, like trying to create one and two in folder:

touch /c folder\one;two

In this case, removing the semicolon creates folder\one and two, but two is
now in the wrong place.

Since the include list is clearly designed for existing files, perhaps an
additional note with touch /c to indicate that neither wildcards nor include
lists may be used would be sufficient.

--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.