Yet another bug - has this been reported yet?

Yet another bug - has this been reported yet?

Post by Arno W. Brouw » Sat, 09 Apr 1994 07:18:29



A friend of mine had some compressed files called <filename>.ex%,
<whatever>.co%, etc., so filenames ending with a '%'.
4DOS seems to be unable to create such filenames.. I've tried, creating
such a filename with Norton Commander, but 4DOS couldn't even delete
it..

--

***************************************************************************
void main(){char *t="void main(){char *t=%c%s%c;printf(t,34,t,34);}";printf
(t,34,t,34);}

 
 
 

Yet another bug - has this been reported yet?

Post by Josch » Sat, 09 Apr 1994 16:20:25



: A friend of mine had some compressed files called <filename>.ex%,
: <whatever>.co%, etc., so filenames ending with a '%'.
: 4DOS seems to be unable to create such filenames.. I've tried, creating
: such a filename with Norton Commander, but 4DOS couldn't even delete
: it..

I bet you made a mistake. The following line should produce such a file:

  echo something >junk.99%%

Note the double % resulting in a single one! This is because % has a
special meaning in 4Dos (and COMMAND.COM as well): It indicates that
a variable name follows. So a single % will result in a blank, what
I guess is what you got. Analogous you can delete the file using

  del junk.99%%

I have to admit I don't have 4Dos5 at hand to check this thing, but
I'm pretty sure my diagnosis is right...

- Jochen

--
--------------------------------------------------------------------------

 Lehrstuhl fuer Informatik II +-------------------------------------------
 Universitaet Wuerzburg       | You are just reading a .sig-light:
 D-97074 Wuerzburg (Germany)  | It is free of fat, sugar and cholesterol!
------------------------------+-------------------------------------------

 
 
 

Yet another bug - has this been reported yet?

Post by 288clif.. » Sun, 10 Apr 1994 01:29:42



> A friend of mine had some compressed files called <filename>.ex%,
> <whatever>.co%, etc., so filenames ending with a '%'.
> 4DOS seems to be unable to create such filenames.. I've tried, creating
> such a filename with Norton Commander, but 4DOS couldn't even delete
> it..

> --

> ***************************************************************************
> void main(){char *t="void main(){char *t=%c%s%c;printf(t,34,t,34);}";printf
> (t,34,t,34);}

'%' is a 4dos shell metacharater used for internal variable/functions.
To use the character in a filename you must quote the entire filename
or just the % character itself. Try one of:

Quote:> del 'filename%'
> del "filename%"
> del filename^%

Note: the carat (^) is probably your command seperator character and not
your single character quote -- look in your on-line/hardcopy docs/help.

/d
--

 
 
 

Yet another bug - has this been reported yet?

Post by Andrew Der » Sun, 10 Apr 1994 12:11:02



Quote:>A friend of mine had some compressed files called <filename>.ex%,
><whatever>.co%, etc., so filenames ending with a '%'.
>4DOS seems to be unable to create such filenames.. I've tried, creating
>such a filename with Norton Commander, but 4DOS couldn't even delete
>it..

That's not a bug, it's a feature.  The % is a special character,
so that you can specify variable names.  If you actually want a %,
then you have to type %%, so you could delete your file by typing:

del <whatever>.co%%

I would recommend reading the documentation before posting any
more bug reports.

Cheers

--

 
 
 

Yet another bug - has this been reported yet?

Post by Roy M. Silverna » Sun, 10 Apr 1994 07:58:12



Quote:> A friend of mine had some compressed files called <filename>.ex%,
> <whatever>.co%, etc., so filenames ending with a '%'.
> 4DOS seems to be unable to create such filenames..

Oh, I don't know about that...

[Ono-Sendai 1]c:\>mcd tmpdir

[Ono-Sendai 1]c:\tmpdir>echo foo > file.co%%

[Ono-Sendai 1]c:\tmpdir>dir

 Volume in drive C is SENDAI         Serial number is 274F:16E2
 Directory of  c:\tmpdir\*.*

.            <DIR>      4-08-94  22:57
..           <DIR>      4-08-94  22:57
file.co%            5   4-08-94  22:57
           5 bytes in 3 file(s)              2,048 bytes allocated
   9,435,136 bytes free

;-)
--

head -2 /usr/philosophy/survival  |      PGP 2.3a public key
#! /usr/local/bin/perl -n         |      available upon request
next unless /$clue/;              |      (send yours)

 
 
 

Yet another bug - has this been reported yet?

Post by Mats Dufbe » Sun, 10 Apr 1994 21:36:04



Quote:>   A friend of mine had some compressed files called <filename>.ex%,
>   <whatever>.co%, etc., so filenames ending with a '%'.
>   4DOS seems to be unable to create such filenames.. I've tried, creating
>   such a filename with Norton Commander, but 4DOS couldn't even delete it..

The following command:

cd >test.ex%%

will create a file called "test.ex%". And

del test.ex%%

will delete it. (I've tested it in 4dos ver. 4.01.)

Mats Dufberg
Stockholm
Sweden

 
 
 

Yet another bug - has this been reported yet?

Post by Tom Ha » Mon, 11 Apr 1994 03:27:44



>The following command:
>cd >test.ex%%
>will create a file called "test.ex%". And
>del test.ex%%
>will delete it. (I've tested it in 4dos ver. 4.01.)

Yep. Works in 4DOS 5.0 Revision D as well.

Tom

 
 
 

Yet another bug - has this been reported yet?

Post by Henry Gess » Tue, 12 Apr 1994 04:59:37



> A friend of mine had some compressed files called <filename>.ex%,
> <whatever>.co%, etc., so filenames ending with a '%'.
> 4DOS seems to be unable to create such filenames.. I've tried, creating
> such a filename with Norton Commander, but 4DOS couldn't even delete
> it..

Are you aware that % is a special character in 4DOS? It is used for expanding
variables and arguments. If you want to specify just the % character then you
have to double it, eg:

 del filename.ex%%

will delete a file called 'filename.ex%'.

However, what I feel _could_ be improved on is that if I type

 del fil<TAB>

then this gets expanded to

 del filename.ex%

whereas I would prefer it to be expanded to

 del filename.ex%%

--                                                                        --