Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

File size = -2?

May
12,846
164
There was another thread about this. It persists. Using 'a' to qualify 'z' in PDIR gives misleading results.

Code:
v:\> pdir /(zc fpn) ftp://ilucky/???????
        <DIR>   ftp://ilucky/MAT122
              0 ftp://ilucky/nobytes

v:\> pdir /(zac fpn) ftp://ilucky/???????
        <DIR>   ftp://ilucky/MAT122
             -2 ftp://ilucky/nobytes

In both cases, the server responded with 0.

And, the help says: "A question mark ? matches any single filename character" when in fact it seems to match 0 or 1 character (above, for example). If that's WAD, the help should say so.
 
> And, the help says: "A question mark? matches any single filename
> character" when in fact it seems to match 0 or 1 character (above, for
> example). If that's WAD, the help should say so.

That's not TCC, that's the file system you're using.

In Windows, a ? matches a single character, or possibly no character if it's
at the end of the filename. But it's too confusing to qualify that in the
help by saying "depending on the OS, the file system, and where you've put
the ? in the name."
 
> There was another thread about this. It persists. Using 'a' to qualify
> 'z' in PDIR gives misleading results.
>
> Code:
> ---------
> v:\> pdir /(zc fpn) ftp://ilucky/???????
> <DIR> ftp://ilucky/MAT122
> 0 ftp://ilucky/nobytes
>
> v:\> pdir /(zac fpn) ftp://ilucky/???????
> <DIR> ftp://ilucky/MAT122
> -2 ftp://ilucky/nobytes
> ---------
> In both cases, the server responded with 0.

There is no way for PDIR (or anything else!) to determine the allocation
size on an ftp server. It's returning an error.

(And no, I don't think it's worthwhile cluttering things up further by
adding it to the help.)
 
On Sun, 11 Sep 2011 14:05:52 -0400, rconn <> wrote:

|---Quote---
|> And, the help says: "A question mark? matches any single filename
|> character" when in fact it seems to match 0 or 1 character (above, for
|> example). If that's WAD, the help should say so.
|---End Quote---
|That's not TCC, that's the file system you're using.
|
|In Windows, a ? matches a single character, or possibly no character if it's
|at the end of the filename. But it's too confusing to qualify that in the
|help by saying "depending on the OS, the file system, and where you've put
|the ? in the name."

And '?' doesn't match '.' (here anyway). Is that also FS dependent?
 
On Sun, 11 Sep 2011 14:18:42 -0400, rconn <> wrote:

|---End Quote---
|There is no way for PDIR (or anything else!) to determine the allocation
|size on an ftp server. It's returning an error.

Why no error for a non-empty file? Couldn't it just return the size as it does
for all other files? File size 0 ins't an error.

Code:
v:\> pdir /a-d /(zac fpn) ftp://ilucky/[in]*
        189,852 ftp://ilucky/ipv4.zip
             -2 ftp://ilucky/nobytes
 
|| And, the help says: "A question mark? matches any single filename
|| character" when in fact it seems to match 0 or 1 character (above,
|| for example). If that's WAD, the help should say so.
|
| That's not TCC, that's the file system you're using.
|
| In Windows, a ? matches a single character, or possibly no character if it's
| at the end of the filename. But it's too confusing to qualify that in the
| help by saying "depending on the OS, the file system, and where you've put
| the ? in the name."

TCC's wildcards are not an exact match to any file sytem I am familiar with, none of NTFS, FAT, POSIX, or VMS. Taking this into consideration, IMHO what TCC ought to do is to convert any file system access using TCC wildcards into one OR MORE file system accesses using the target file system's syntax, using its wildcard syntax if applicable. Barring this, there ought to be a more exact definition what it actually does, possibly as a "technical footnote".
--
Steve
 
On Sun, 11 Sep 2011 15:25:03 -0400, rconn <> wrote:

|---Quote---
|> Why no error for a non-empty file? Couldn't it just return the size as
|> it does for all other files? File size 0 ins't an error.
|---End Quote---
|You want it to silently return the wrong values?
|
|The issue is why it doesn't return -2 for files > 0.

Technically, yes. So I guess the question is ... when disk allocation is not
possible what would the user prefer to see, actual sizes or a bunch of "-2"s?
I'd opt for the sizes. OTOH a bunch of "-2"s would (after another discussion
like this) teach the user not to use 'a' when it's not appropriate.

A short parenthetical "when possible" in the help about the 'a' modifier could
clear it up a bit.
 

Similar threads

G
Replies
8
Views
3K
Back
Top