how many people use ('s in filenames
how many people use ('s in filenames
I am making my console and well i'm wanting to kow of a good command from argument seperator and what i mean is like dos uses space such as format C:\ I am really not wanting to use space. i was thinking ('s such as format(C:\,extra option) and have spaces in arguments a perfectly orthadox practice but how many use ('s in filenames as i dont want no quote crap
i was also thinking maybe { or [
i was also thinking maybe { or [
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: how many people use ('s in filenames
a space is more intuitive to those who are an old hand at computing. Almost all command lines follow the UNIX convention of using a space to seperate parameters on the command line, but that doesn't mean that you have to
Choose whatever is intuitive for you.
Choose whatever is intuitive for you.
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein
Re: how many people use ('s in filenames
(, [ and { have the problem that the user might except to see }, ] or ) then ...
*post*
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: how many people use ('s in filenames
Music lovers will hate using the parantheses...especially those from the EDM side of things.
Remix names are nearly always enclosed in parantheses.
But in any event you're gonna have to either:
1. Ban certain characters from appearing in file names or command line parameters
2. Use wildcards or quotes to enclose names that have special characters in them
3. Have an entirely different way of entering parameters into your commands, like a GUI or something (not really feasable if you want to be using scripts in the future)
Perhaps have multiple interfaces which use different characters and let the user decide (way too much work, and too many compatability issues with scripts).
Or, face it....use the conventional command line format *thumbs up* hehe
Remix names are nearly always enclosed in parantheses.
But in any event you're gonna have to either:
1. Ban certain characters from appearing in file names or command line parameters
2. Use wildcards or quotes to enclose names that have special characters in them
3. Have an entirely different way of entering parameters into your commands, like a GUI or something (not really feasable if you want to be using scripts in the future)
Perhaps have multiple interfaces which use different characters and let the user decide (way too much work, and too many compatability issues with scripts).
Or, face it....use the conventional command line format *thumbs up* hehe
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein
Re: how many people use ('s in filenames
I use Parens and square-brackets for info and versioning, respectively. So it wouldn't be uncommon to see something like "LetterToWill(draft).wpd", "Shell[2].exe" and "Kernel[3].bin" living on my hard drive.
Your idea seems like a 'programming'-style command-line, which is fine... but, in my experience, white-space is always best treated as a single (and ignored) seperator/visual-formatter.
Take the makefile structure or that programming-language that uses spaces to determine the level of the line (I forget its name) for example, a nightmare. Whereas Pascal (and C/C++) simply ignore the whitespace except as a seperator.
Just my two cents, hope you find it useful.
Your idea seems like a 'programming'-style command-line, which is fine... but, in my experience, white-space is always best treated as a single (and ignored) seperator/visual-formatter.
Take the makefile structure or that programming-language that uses spaces to determine the level of the line (I forget its name) for example, a nightmare. Whereas Pascal (and C/C++) simply ignore the whitespace except as a seperator.
Just my two cents, hope you find it useful.
Re: how many people use ('s in filenames
the problem is that whatever is used as a separater, must be forbidden in filenames -- if you use a space, then no filename may contain spaces, and most people use spaces regularlywhite-space is always best treated as a single (and ignored) seperator/visual-formatter.
Re: how many people use ('s in filenames
I don't think that we often use filenames with space... I always use _ instead of space. However it will be good to allow filenames with space, but for example file name must be into "s or ('s, for example:
Everything what you need is a good algorithm.
Code: Select all
cd "Program Files"
cd (Program Files)
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: how many people use ('s in filenames
Unless, ofcourse, you use a form of escape codes... at which point you can use any character in the filename.the problem is that whatever is used as a separater, must be forbidden in filenames -- if you use a space, then no filename may contain spaces, and most people use spaces regularly
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: how many people use ('s in filenames
Most users that don't remember DOS will use spaces in filenames. Old school developers dont use them out of habit (they recall when it wasn't legal) and because it's a pain to use spaces in a terminal window... but, of course, we aren't the majority of OS usersHery Sasta wrote:I don't think that we often use filenames with space... I always use _ instead of space. However it will be good to allow filenames with space, but for example file name must be into "s or ('s, for example:Everything what you need is a good algorithm.Code: Select all
cd "Program Files" cd (Program Files)
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: how many people use ('s in filenames
Not nessesarily. *NIX and Windows allow the use of spaces, and they achieve this by putting quote marks around filenames wich contain spaces.JAAman wrote:
the problem is that whatever is used as a separater, must be forbidden in filenames -- if you use a space, then no filename may contain spaces, and most people use spaces regularly
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein
Re: how many people use ('s in filenames
yes, but they then cannot allow quotes within filenames
i don't think anyone understood what i meant -- you have to use something as a separater, but whatever you choose cannot be allowed in the filename
DOS uses spaces (and will not permit them in filenames -- and i cannot remember the last longer filename i created without spaces)
win9x/winXP do permit spaces (even at the command line) but they use quotes for separaters (with the special exception of allowing spaces if it doesn't begin with a quote -- for compatability))
i don't think anyone understood what i meant -- you have to use something as a separater, but whatever you choose cannot be allowed in the filename
DOS uses spaces (and will not permit them in filenames -- and i cannot remember the last longer filename i created without spaces)
win9x/winXP do permit spaces (even at the command line) but they use quotes for separaters (with the special exception of allowing spaces if it doesn't begin with a quote -- for compatability))
Last edited by JAAman on Wed Jan 18, 2006 12:00 am, edited 1 time in total.
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: how many people use ('s in filenames
*NIX allows any character in a file name. *NIX shells use the backslash ('\') in the command line to denote that the next character is literal. The backslash is used to remove the special meaning from all of *NIXs special characters.
The only reason Microsoft included these special rules for allowable characters in file names for that one reason, being backward compatability.
With a new operating system, this is not an issue. Really any developer should experiment with the command line formats and go with whatever suits them.
The only reason Microsoft included these special rules for allowable characters in file names for that one reason, being backward compatability.
With a new operating system, this is not an issue. Really any developer should experiment with the command line formats and go with whatever suits them.
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: how many people use ('s in filenames
They could, though:JAAman wrote:yes, but they then cannot allow quotes within filenames
do_something "filename with spaces and "quotes"" etc last argument
And before someone says you can't use \ in a filename, you'd just prefix it again:
do_something "filename with spaces and "quotes" and \\ slashes"
--Jeff
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: how many people use ('s in filenames
In *NIX you can even put unreadable characters in filenames, characters such as carriage returns and bells. Makes it really confusing when the names in your drive get corrupted
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
--- Albert Einstein
Re: how many people use ('s in filenames
LOL - Indeed, it would be wise not to allow unreadible characters in the filename. Well, in my oppinion.Da_Maestro wrote:In *NIX you can even put unreadable characters in filenames, characters such as carriage returns and bells. Makes it really confusing when the names in your drive get corrupted