Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 14, 2006
- 453 views
Brian Broker wrote: >Wouldn't it be more "natural" to "surround" the paths with "quotes" since >that's >how the command-line works? It's your call but I guess I'm just interested >as to why you didn't comment on my idea. > >Can a quote be part of a Linux path? > >-- Brian > > Brian Broker wrote: > > > Wouldn't it be more "natural" to "surround" the paths with "quotes" since > that's > how the command-line works? It's your call but I guess I'm just interested > as to why you didn't comment on my idea. > > Can a quote be part of a Linux path? > > -- Brian > > PS: does that solution handle a path named "c:\my;;;dir;;\myfile;;d;"? > > i.e. --> ;c:\my;;;dir;;\myfile;;d;;;d:\mydir\myfile; Hi there Brian, Sorry about that, i meant to comment on your post... About the quotes: Im afraid we'll need quotes to surround paths that contain spaces, so that might end up looking like: ""c:\mydir\My File With Some Spaces.txt"" But now that you mention it, maybe that would be ok too. Does using the semicolon allow using semicolons in the path as in your example? No, that's the drawback. On the other hand, semicolons are used in the Environment var PATH to separate paths, so i assumed this would work, but who knows how a user might name his folder or file right... MyFile;This;That;.txt maybe. Im going to have to consider using double quotes after reading your post again. I think this would be a better idea too now. Nice thing is, i already have the program set up to parse with a constant delimiter char, so all i have to do now is change one line: constant DELIMCHAR='"' instead of the semicolon ';' . Yeah, this sounds good :) Thanks. Probably even looks more natural to a person that doesnt do any programming (another nice thing i like to see). Now to see if my file saver/reader will easily save and read back the double quotes without any problem. If not i'll have to update that i guess. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."