how many people use ('s in filenames

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

how many people use ('s in filenames

Post by earlz »

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 [
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Re: how many people use ('s in filenames

Post by Da_Maestro »

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.
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
Legend
Member
Member
Posts: 195
Joined: Tue Nov 02, 2004 12:00 am
Contact:

Re: how many people use ('s in filenames

Post by Legend »

(, [ and { have the problem that the user might except to see }, ] or ) then ...
*post*
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Re: how many people use ('s in filenames

Post by Da_Maestro »

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
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
Shark8
Member
Member
Posts: 27
Joined: Wed Nov 02, 2005 12:00 am

Re: how many people use ('s in filenames

Post by Shark8 »

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.
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: how many people use ('s in filenames

Post by JAAman »

white-space is always best treated as a single (and ignored) seperator/visual-formatter.
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
Hery
Member
Member
Posts: 65
Joined: Sat Dec 04, 2004 12:00 am

Re: how many people use ('s in filenames

Post by Hery »

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:

Code: Select all

cd "Program Files"
cd (Program Files)
Everything what you need is a good algorithm.
User avatar
carbonBased
Member
Member
Posts: 382
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Re: how many people use ('s in filenames

Post by carbonBased »

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
Unless, ofcourse, you use a form of escape codes... at which point you can use any character in the filename.
User avatar
carbonBased
Member
Member
Posts: 382
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Re: how many people use ('s in filenames

Post by carbonBased »

Hery 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:

Code: Select all

cd "Program Files"
cd (Program Files)
Everything what you need is a good algorithm.
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 users :)
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Re: how many people use ('s in filenames

Post by Da_Maestro »

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
Not nessesarily. *NIX and Windows allow the use of spaces, and they achieve this by putting quote marks around filenames wich contain spaces.
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: how many people use ('s in filenames

Post by JAAman »

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))
Last edited by JAAman on Wed Jan 18, 2006 12:00 am, edited 1 time in total.
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Re: how many people use ('s in filenames

Post by Da_Maestro »

*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.
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
User avatar
carbonBased
Member
Member
Posts: 382
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Re: how many people use ('s in filenames

Post by carbonBased »

JAAman wrote:yes, but they then cannot allow quotes within filenames
They could, though:

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
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Re: how many people use ('s in filenames

Post by Da_Maestro »

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
Shark8
Member
Member
Posts: 27
Joined: Wed Nov 02, 2005 12:00 am

Re: how many people use ('s in filenames

Post by Shark8 »

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 ;)
LOL - Indeed, it would be wise not to allow unreadible characters in the filename. Well, in my oppinion.
Post Reply