public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* DOS <-> Unix filenames
@ 1999-01-31 23:52 Roger René Kommer
  1999-01-31 23:52 ` Anil K Ruia
  0 siblings, 1 reply; 3+ messages in thread
From: Roger René Kommer @ 1999-01-31 23:52 UTC (permalink / raw)
  To: gnu-win32

Hi,

I like to instrument bash, sed, etc. to manage my NT Server.

A common problem is, that in scripts that uses gygwin and NT command
line utilities I have to covert the filenames from NT to cygwin
and vice versa.

Sample:

//e/d/cxx/aproject <-> e:\d\cxx\aproject
/usr/local/myfiles <-> d:\unixfs\usr\local\myfiles
/cdrom/x/file      <-> x:\file
./dir/output       <-> .\dir\output

What I need is a (two) utilities which can convert these filenames
ufn2dfn [u]nix[f]ile[n]ame2[d]os[f]ile[n]ame
and
dfn2ufn [d]os[f]ile[n]ame2[u]nix[f]ile[n]ame

ufilelist="//e/d/cxx/aproject /usr/local/myfiles /cdrom/x/file ./dir/output"
for i in $ufilelist; do
	a_ntutility `ufn2dfn "$i"`
done

dfn2ufn is quite simple and can done with a few sed calls.
ufn2dfn is a little more complicated, because it has to evaluate the mount
table.

If I didn't overlook a simpler solution I would suggest to integrate this
into the cygwin package. Alternatively it can be integrated into the ls or
mount command.

With RFC and regards,
Roger Rene Kommer
kommer@artefaktur.com






-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DOS <-> Unix filenames
  1999-01-31 23:52 DOS <-> Unix filenames Roger René Kommer
@ 1999-01-31 23:52 ` Anil K Ruia
  0 siblings, 0 replies; 3+ messages in thread
From: Anil K Ruia @ 1999-01-31 23:52 UTC (permalink / raw)
  To: roger; +Cc: gnu-win32

There is a utility called cygpath which does that.
- Anil
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: DOS <-> Unix filenames
@ 1999-01-31 23:52 Bernard Dautrevaux
  0 siblings, 0 replies; 3+ messages in thread
From: Bernard Dautrevaux @ 1999-01-31 23:52 UTC (permalink / raw)
  To: 'roger@isp.uni-kassel.de', gnu-win32

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]

> -----Message d'origine-----
> De:	Roger René Kommer [SMTP:kommer@artefaktur.com]
> Date:	Monday, January 04, 1999 15:25
> À:	gnu-win32@cygnus.com
> Objet:	DOS <-> Unix filenames
> 
> Hi,
> 
> I like to instrument bash, sed, etc. to manage my NT Server.
> 
> A common problem is, that in scripts that uses gygwin and NT command
> line utilities I have to covert the filenames from NT to cygwin
> and vice versa.
> 
> Sample:
> 
> //e/d/cxx/aproject <-> e:\d\cxx\aproject
> /usr/local/myfiles <-> d:\unixfs\usr\local\myfiles
> /cdrom/x/file      <-> x:\file
> ../dir/output       <-> .\dir\output
> 
> What I need is a (two) utilities which can convert these filenames
> ufn2dfn [u]nix[f]ile[n]ame2[d]os[f]ile[n]ame
> and
> dfn2ufn [d]os[f]ile[n]ame2[u]nix[f]ile[n]ame
> 
	<snipped>
> 
> If I didn't overlook a simpler solution I would suggest to integrate
this
> into the cygwin package. Alternatively it can be integrated into the
ls or
> mount command.

They already are present in cygwin-B20:
	ufn2dfn <==> cygpath -w
	dfn2ufn <==> cygpath -u

cygpath accept path names expressed as well as Unix-like names or
DOS-like names, and is also able to convert DOS ';'-separated path lists
in/from UNIX ':'-separated path lists.

	Regards,

		Bernard

------------------------------------------------------------------------
------
Bernard Dautrevaux
Microprocess Ingéniérie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
------------------------------------------------------------------------
------

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-01-31 23:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-31 23:52 DOS <-> Unix filenames Roger René Kommer
1999-01-31 23:52 ` Anil K Ruia
1999-01-31 23:52 Bernard Dautrevaux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).