ms dos file paths
[1/6] from: gchiu::compkarori::co::nz at: 30-Mar-2002 16:49
Anyone written a utility to convert msdos paths to and from
Rebol file names
--
Graham Chiu
[2/6] from: anton:lexicon at: 30-Mar-2002 17:19
Are you are aware of:
>> to-rebol-file "C:\windows\system32"
== %/C/windows/system32
>> to-local-file system/options/boot
== %D:\Anton\Dev\Rebol\view\rebol.exe
?
Anton.
[3/6] from: jurgens:akcorp at: 29-Mar-2002 22:01
Here is a function I use to convert Rebol paths to Windows paths:
windows-path: func[
{Takes a Rebol file type and returns a string using Windows path syntax.}
path [file!]] [
path: form path
return replace/all either all [
equal? path/1 #"/"
equal? path/3 #"/"
]
[
head insert next remove path ":"
][
path
] "/" "\"
]
Burt
[jurgens--akcorp--net]
[4/6] from: philb:upnaway at: 30-Mar-2002 14:25
Hi Graham,
Do you mean ms-dos (8.3) format or Windows (long filename) format?
You can use to-rebol-file to convert a file name from Windows format to Rebol
format (in Rebol/view at least).
Nothing built in for the opposite way around though.
Cheers Phil
=== Original Message ===
Anyone written a utility to convert msdos paths to and from
Rebol file names
--
Graham Chiu
[5/6] from: gchiu:compkarori at: 30-Mar-2002 19:43
On Sat, 30 Mar 2002 17:19:49 +1100
"Anton" <[anton--lexicon--net]> wrote:
> Are you are aware of:
>
> >> to-rebol-file "C:\windows\system32"
> == %/C/windows/system32
>
> >> to-local-file system/options/boot
> == %D:\Anton\Dev\Rebol\view\rebol.exe
>
Groan :(
Just spent a few mins writing my own.
--
Graham Chiu
[6/6] from: anton:lexicon at: 1-Apr-2002 22:29
> > Are you are aware of:
> >
<<quoted lines omitted: 6>>
> Groan :(
> Just spent a few mins writing my own.
Oh well, just imagine you'd made the same mistake in
java... :)
Anton.
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted