[comp.sys.amiga] ":" in file names

paolucci@snll-arpagw.UUCP (Sam Paolucci) (05/01/89)

How can one copy or rename a file that has a ":" or more in the file
name?  I tried putting the name in double quotes, but I still get
a requester to mount a volume.
-- 
					-+= SAM =+-
"the best things in life are free"

				ARPA: paolucci@snll-arpagw.llnl.gov

tomb@hplsla.HP.COM (Tom Bruhns) (05/03/89)

> How can one copy or rename a file that has a ":" or more in the file
> name?  I tried putting the name in double quotes, but I still get
> a requester to mount a volume.
> -- 
> 					-+= SAM =+-

You might try using a wildcard in the copy:  call abc:def abc?def.
Of course this doesn't work quite like you want if there's another
file that looks too close to the one you want to copy.  I don't
think this will work with rename, and am not positive about the
copy, but I used it once to copy a file named "*".  You might be
able to rename it by going into the disk with a disk editor.

new@udel.EDU (Darren New) (05/04/89)

In article <5160032@hplsla.HP.COM> tomb@hplsla.HP.COM (Tom Bruhns) writes:
>You might be able to rename it by going into the disk with a disk editor.

If you use a simple editor, like DiskEd, then the new hash is very 
unlikely to match the old hash and you may get a corrupt disk.
What *I* want to know is how you got a file name with a colon in
it on the disk in the first place?  -- Darren

fgd3@jc3b21.UUCP (Fabbian G. Dufoe) (05/04/89)

From article <110@snll-arpagw.UUCP>, by paolucci@snll-arpagw.UUCP (Sam Paolucci):
> How can one copy or rename a file that has a ":" or more in the file
> name?  

From the AmigaDOS User's Manual:

     The filing system allows filenames to have up to thirty charaters,
     where the characters may be any printing character except slach (/)
     and colon(:).  This means that you can include space( ), equals (=),
     plus (+), and double quote ("), all special characters recognized by
     the CLI, within a filename.  However, if you use these special
     characters, you must enclose the entire filenmae with double quotes.
     To introduce a double quote character within a filename, youmust type
     an asterisk (*) immediately before that character.  In addition, to
     introduce an asterisk, you must type another asterisk.  

That suggests you might try "file*:withcolon".

--Fabbian Dufoe
  350 Ling-A-Mor Terrace South
  St. Petersburg, Florida  33705
  813-823-2350

UUCP: ...uunet!pdn!jc3b21!fgd3

ranjit@zelazny.cis.upenn.edu (Ranjit Bhatnagar) (05/04/89)

>> How can one copy or rename a file that has a ":" or more in the file
>> name?  I tried putting the name in double quotes, but I still get
>> a requester to mount a volume.

Specify the complete pathname, like this:

  rename workbench:files/things/oops:mistake as workbench:files/things/oops

Only the first : counts, so the 2nd will be accepted.

	- ranjit


"Trespassers w"   ranjit@eniac.seas.upenn.edu	mailrus!eecae!netnews!eniac!...
	I'd be calling all the hotlines/I'd be missing all my deadlines
	I'd be standing in the breadlines/I'd be six feet underground

paolucci@snll-arpagw.UUCP (Sam Paolucci) (05/04/89)

In article <14617@louie.udel.EDU> new@udel.EDU (Darren New) writes:
->What *I* want to know is how you got a file name with a colon in
->it on the disk in the first place?  -- Darren

You see, when you use NFS, you can access files that have been created
by the server.  I have a program that runs on my MicroVAX server that
insists on creating files with the date and time in the file name.  I
have to then work with these files on the Amiga ...


-- 
					-+= SAM =+-
"the best things in life are free"

				ARPA: paolucci@snll-arpagw.llnl.gov

paolucci@snll-arpagw.UUCP (Sam Paolucci) (05/04/89)

In article <654@jc3b21.UUCP> fgd3@jc3b21.UUCP (Fabbian G. Dufoe) writes:
->From article <110@snll-arpagw.UUCP>, by paolucci@snll-arpagw.UUCP (Sam Paolucci):
->> How can one copy or rename a file that has a ":" or more in the file
->> name?  
->
->From the AmigaDOS User's Manual:
->
->     The filing system allows filenames to have up to thirty charaters,
->     where the characters may be any printing character except slach (/)
->     and colon(:).  This means that you can include space( ), equals (=),
->     plus (+), and double quote ("), all special characters recognized by
->     the CLI, within a filename.  However, if you use these special
->     characters, you must enclose the entire filenmae with double quotes.
->     To introduce a double quote character within a filename, youmust type
->     an asterisk (*) immediately before that character.  In addition, to
->     introduce an asterisk, you must type another asterisk.  
->
->That suggests you might try "file*:withcolon".

Your quote from the AmigaDOS manual also suggests that it should work within
double quotes without having to use the asterisk.  But I can tell you that
it DOES NOT work.



-- 
					-+= SAM =+-
"the best things in life are free"

				ARPA: paolucci@snll-arpagw.llnl.gov

mcp@ziebmef.uucp (Marc Plumb) (05/12/89)

Make sure you specify a volume name, e.g. "df1:some/dir/the:file".
Dos always looks for the first colon and uses that as a device
name, but it's not smart enough to notice the second.

BTW, any opinions on what is The Right Thing to do with :'s in file names?
If they should be disallowed, who should check and what should be done?
--
	-Colin

deven@rpi.edu (Deven Corzine) (05/17/89)

In article <1989May11.221814.10870@ziebmef.uucp> mcp@ziebmef.uucp (Marc Plumb) writes:

   Make sure you specify a volume name, e.g. "df1:some/dir/the:file".
   Dos always looks for the first colon and uses that as a device
   name, but it's not smart enough to notice the second.

"not smart enough"?  I'd say that's the proper behavior.

   BTW, any opinions on what is The Right Thing to do with :'s in file names?
   If they should be disallowed, who should check and what should be done?

Certainly.  Allow colons in filenames.  So you just have to specify a
full pathname is all.  Besides, disallowing colons in filenames would
make it difficult for such devices as PATH:...

Deven
--
shadow@[128.113.10.2]   <shadow@pawl.rpi.edu> Deven T. Corzine (518) 272-5847
shadow@[128.113.10.201] <shadow@acm.rpi.edu>  2346 15th St.    Pi-Rho America
deven@rpitsmts.bitnet   <userfxb6@rpitsmts>   Troy, NY 12180-2306  <<tionen>>
"Simple things should be simple and complex things should be possible." - A.K.

paolucci@snll-arpagw.UUCP (Sam Paolucci) (05/18/89)

In article <DEVEN.89May17124740@daniel.rpi.edu> deven@rpi.edu (Deven Corzine) writes:
->In article <1989May11.221814.10870@ziebmef.uucp> mcp@ziebmef.uucp (Marc Plumb) writes:
->
->   Make sure you specify a volume name, e.g. "df1:some/dir/the:file".
->   Dos always looks for the first colon and uses that as a device
->   name, but it's not smart enough to notice the second.
->
->"not smart enough"?  I'd say that's the proper behavior.
->
->   BTW, any opinions on what is The Right Thing to do with :'s in file names?
->   If they should be disallowed, who should check and what should be done?
->
->Certainly.  Allow colons in filenames.  So you just have to specify a
->full pathname is all.  Besides, disallowing colons in filenames would
->make it difficult for such devices as PATH:...

Why should you have to specify the full pathname if the file name with
the colon is within double quotes.  It seems to me that anything within
double quotes should not be interpreted.  Unfortunately, that's not
what happens.
-- 
					-+= SAM =+-
"the best things in life are free"

				ARPA: paolucci@snll-arpagw.llnl.gov

deven@rpi.edu (Deven Corzine) (05/21/89)

In article <115@snll-arpagw.UUCP> paolucci@snll-arpagw.UUCP (Sam Paolucci) writes:

   Why should you have to specify the full pathname if the file name with
   the colon is within double quotes.  It seems to me that anything within
   double quotes should not be interpreted.  Unfortunately, that's not
   what happens.

But what if you were trying to create a file named "random file" on
df0:, and your cwd is ram:?  If it gave : characters no special
treatment, then trying to create the file using "df0:random file"
would end up actually creating "ram:df0:random file" -- the file name
preceded by the intended device, on an unintended device.  I don't
consider that to be an acceptable situation.  The behavior is still
correct.  Perhaps inconvenient, but correct.

Perhaps you should be able to escape the : -- using "df0\:file" or
"df0*:file" to create a file of the name "df0:file" in the current
directory on the current device.  But as far as simply ignoring
anything quoted, no it should not.  Furthermore, the OS has no idea
what may have been quoted; only the application parsing the input line
knows.

Note that the application COULD build a full pathname for the current
working directory before using the quoted filename, if you really want
the behavior you described...)

Deven
--
shadow@[128.113.10.2]   <shadow@pawl.rpi.edu> Deven T. Corzine (518) 272-5847
shadow@[128.113.10.201] <shadow@acm.rpi.edu>  2346 15th St.    Pi-Rho America
deven@rpitsmts.bitnet   <userfxb6@rpitsmts>   Troy, NY 12180-2306  <<tionen>>
"Simple things should be simple and complex things should be possible." - A.K.