[REBOL] accessing files on other partitions Re:(3)
I don't believe it's possible in REBOL to write f: read %C:\Windows\Desktop\ You have to convert it to f: read %/c/windows/desktop/ -- Michael Cornelio - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 21, 2000 10:42 AM Subject: [REBOL] Re: accessing files on other partitions Re: > Hello, I thought Rebol did this translation itself. > > Elliott > > On 18-Jan-00, [EMAIL PROTECTED] wrote: > > > try ... > > > > test: read %/d/whatever/file.txt > > > > or you could try this home grown function (one of my earliest REBOL > > utilities) > > > > cvt-win-path: func [ > > {Convert a Windows pathname (e.g., C:\Windows\Desktop) to REBOL path} > > > >> On Win32, what's the syntax to access a file in an other partition? > >> > >> If, I'm on f: > >> > >> then > >> > >> test: read %d:\whatever\file.txt > >> > >> fails > >> > >> --- > >> Regards,Graham Chiu > >> gchiucompkarori.co.nz > >> http://www.compkarori.com/dynamo - The Homebuilt Dynamo > >> http://www.compkarori.com/dbase - The dBase bulletin > >> > > > > >
[REBOL] accessing files on other partitions Re:(5)
On 1/19/2000 at 1:01 AM [EMAIL PROTECTED] wrote: { It's just: read %/computer/c/whatever/file.txt The algorithm for WinXX systems assumes that if the root is more than one character it is a network connection. So, don't label your drives with single letters! :-) Hope this helps. - jim } Just to nitpick, this should read don't "name your shares with single letters". Which is a good comment, since this is the Windows default when sharing a root directory. (Not that anyone here would do such a thing as share a root directory!) *** REPLY SEPARATOR *** On 1/19/2000 at 1:01 AM [EMAIL PROTECTED] wrote: It's just: read %/computer/c/whatever/file.txt The algorithm for WinXX systems assumes that if the root is more than one character it is a network connection. So, don't label your drives with single letters! :-) Hope this helps. - jim At 12:34 AM 1/19/00 -0800, you wrote: >Graham Chiu wrote: >> >test: read %/d/whatever/file.txt >> What about reading across a network (unc) ? > >I think it's: >test: read %//computer/directory/file.ext >but I haven't got access to a networked computer to try it out. > >Andrew Martin >ICQ: 26227169 >[EMAIL PROTECTED] >http://members.xoom.com/AndrewMartin/ >-><- >
[REBOL] accessing files on other partitions Re:(5)
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes >It's just: > >read %/computer/c/whatever/file.txt > >The algorithm for WinXX systems assumes that if the root is more than one >character it is a network connection. So, don't label your drives with >single letters! :-) Hope this helps. Okay, I just sussed it out. Rather than 'c' and 'whatever', I substituted the windows shared names, and that worked. --- Regards,Graham Chiu gchiucompkarori.co.nz http://www.compkarori.com/dynamo - The Homebuilt Dynamo http://www.compkarori.com/dbase - The dBase bulletin
[REBOL] accessing files on other partitions Re:(5)
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes >It's just: > >read %/computer/c/whatever/file.txt I tried this at home, and it does not work. I'll try my other network at work tomorrow as well. --- Regards,Graham Chiu gchiucompkarori.co.nz http://www.compkarori.com/dynamo - The Homebuilt Dynamo http://www.compkarori.com/dbase - The dBase bulletin
[REBOL] accessing files on other partitions Re:(4)
It's just: read %/computer/c/whatever/file.txt The algorithm for WinXX systems assumes that if the root is more than one character it is a network connection. So, don't label your drives with single letters! :-) Hope this helps. - jim At 12:34 AM 1/19/00 -0800, you wrote: >Graham Chiu wrote: >> >test: read %/d/whatever/file.txt >> What about reading across a network (unc) ? > >I think it's: >test: read %//computer/directory/file.ext >but I haven't got access to a networked computer to try it out. > >Andrew Martin >ICQ: 26227169 >[EMAIL PROTECTED] >http://members.xoom.com/AndrewMartin/ >-><- >
[REBOL] accessing files on other partitions Re:(3)
Graham Chiu wrote: > >test: read %/d/whatever/file.txt > What about reading across a network (unc) ? I think it's: test: read %//computer/directory/file.ext but I haven't got access to a networked computer to try it out. Andrew Martin ICQ: 26227169 [EMAIL PROTECTED] http://members.xoom.com/AndrewMartin/ -><-
[REBOL] accessing files on other partitions Re:
not sure but maybe you need to use forward slashes instead of backslashes. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 18, 2000 1:51 PM Subject: [REBOL] accessing files on other partitions > > On Win32, what's the syntax to access a file in an other partition? > > If, I'm on f: > > then > > test: read %d:\whatever\file.txt > > fails > > --- > Regards,Graham Chiu > gchiucompkarori.co.nz > http://www.compkarori.com/dynamo - The Homebuilt Dynamo > http://www.compkarori.com/dbase - The dBase bulletin >
[REBOL] accessing files on other partitions Re:(3)
Hi Graham Sorry, but as far as Iknow REBOL does not support UNC names, any network dirs your wish to access have to be mapped to a drive letter on the machine on which REBOL runs. Hope this helps Larry - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 18, 2000 2:34 PM Subject: [REBOL] accessing files on other partitions Re:(2) > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > writes > >It's the same on every platform. On Win, the drive letters become > >single letter volumes. Backslashes are not valid. Use slashes. > > > >test: read %/d/whatever/file.txt > > > >HTH > > Thanks to all. That worked fine. I can't say I ever came across this > in the documentation. > > What about reading across a network (unc) ? > > --- > Regards,Graham Chiu > gchiucompkarori.co.nz > http://www.compkarori.com/dynamo - The Homebuilt Dynamo > http://www.compkarori.com/dbase - The dBase bulletin >
[REBOL] accessing files on other partitions Re:(2)
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes >It's the same on every platform. On Win, the drive letters become >single letter volumes. Backslashes are not valid. Use slashes. > >test: read %/d/whatever/file.txt > >HTH Thanks to all. That worked fine. I can't say I ever came across this in the documentation. What about reading across a network (unc) ? --- Regards,Graham Chiu gchiucompkarori.co.nz http://www.compkarori.com/dynamo - The Homebuilt Dynamo http://www.compkarori.com/dbase - The dBase bulletin
[REBOL] accessing files on other partitions Re:
Graham Chiu wrote: > On Win32, what's the syntax to access a file in an other partition? > > If, I'm on f: > > then > > test: read %d:\whatever\file.txt > > fails This: read %/d/whatever/file.txt or: read %"/c/Program Files/REBOL/user.r" for long filenames with embedded spaces. Andrew Martin ICQ: 26227169 [EMAIL PROTECTED] http://members.xoom.com/AndrewMartin/ -><-
[REBOL] accessing files on other partitions Re:
>test: read %d:\whatever\file.txt read %/d/whatever/file.txt ;- Elan >> [: - )]
[REBOL] accessing files on other partitions Re:
try ... test: read %/d/whatever/file.txt or you could try this home grown function (one of my earliest REBOL utilities) cvt-win-path: func [ {Convert a Windows pathname (e.g., C:\Windows\Desktop) to REBOL path} path [ string! ] /local tmp ] [ ; convert backslashes to slashes tmp: replace/all path {\} {/} ; check if drive is specified if ((length? tmp) > 2) [ if (second tmp) == #":" [ tmp: join {/} [ (first tmp) (next next tmp) ] ] ] ; TODO - handle UNC names ... i.e., \\machine\path return to-file :tmp ] then use ... test: read cvt-win-path "d:\whatever\file.txt" Hope this helps. I use this when I'm parsing files generated by other programs (e.g., DIR /S /B) -- Michael Cornelio The Cornelio Group - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 18, 2000 11:51 AM Subject: [REBOL] accessing files on other partitions > > On Win32, what's the syntax to access a file in an other partition? > > If, I'm on f: > > then > > test: read %d:\whatever\file.txt > > fails > > --- > Regards,Graham Chiu > gchiucompkarori.co.nz > http://www.compkarori.com/dynamo - The Homebuilt Dynamo > http://www.compkarori.com/dbase - The dBase bulletin >
[REBOL] accessing files on other partitions Re:
Graham wrote: > On Win32, what's the syntax to access a file in an other partition? > > If, I'm on f: > > then > > test: read %d:\whatever\file.txt Filenames look more like Unix... try: test: read %/D/whatever/file.txt Cheers, Kev Kevin McKinnon, Network Engineer [EMAIL PROTECTED] Sunshine Communications http://www.sunshinecable.com **NOTE NEW E-MAIL ADDRESS** PGP Public Key: http://www.dockmaster.net/pgp.html PGP 6.0 www.pgp.com
[REBOL] accessing files on other partitions Re:
Graham: try this: test: read %/d/whatever/file.txt or I have a lot of common files on shared drive S: so I use: test: read %/s/folder/filename.txt Graham Chiu wrote: { test: read %d:\whatever\file.txt fails } Douglas Vos - TFS-GM Webmaster e-Mail: mailto:[EMAIL PROTECTED] AlphaPager: mailto:2488277399.26956pagenet.net = Snail Mail ;-) MS: 482-B07-D76 200 Renaissance Center, 7th floor Detroit, MI 48265 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 18, 2000 2:51 PM To: [EMAIL PROTECTED] Subject: [REBOL] accessing files on other partitions On Win32, what's the syntax to access a file in an other partition? If, I'm on f: then test: read %d:\whatever\file.txt fails --- Regards,Graham Chiu gchiucompkarori.co.nz http://www.compkarori.com/dynamo - The Homebuilt Dynamo http://www.compkarori.com/dbase - The dBase bulletin
[REBOL] accessing files on other partitions Re:
It's the same on every platform. On Win, the drive letters become single letter volumes. Backslashes are not valid. Use slashes. test: read %/d/whatever/file.txt HTH -Ted. *** REPLY SEPARATOR *** On 1/19/2000 at 7:51 AM [EMAIL PROTECTED] wrote: On Win32, what's the syntax to access a file in an other partition? If, I'm on f: then test: read %d:\whatever\file.txt fails --- Regards,Graham Chiu gchiucompkarori.co.nz http://www.compkarori.com/dynamo - The Homebuilt Dynamo http://www.compkarori.com/dbase - The dBase bulletin