Dots in filenames?
- XorA
- Site Admin
- Posts: 1631
- Joined: Thu Jun 02, 2011 11:31 am
- Location: Shotts, North Lanarkshire, Scotland, UK
Dots in filenames?
Whats the deal with these on QDOS, I remember seeing the reason they are not allowed once upon a time. But can't remember it!
- vanpeebles
- Commissario Pebbli
- Posts: 2852
- Joined: Sat Nov 20, 2010 7:13 pm
- Location: North East UK
Re: Dots in filenames?
I think you need to use " " around a filename with a . in it, on a BBQL, and sometimes then I found it a bit fussy. I always avoid them and change it to _ first when using zips etc.
Re: Dots in filenames?
QL S*Basic accepts two different variable types for filenames - Strings and Names
A string is typically either a variable of type string (marked by the "$" sign) or a string constant enclosed in single or double quotes. Once you put the string in quotes, S*Basic will accept basically any character in the file name, dots included.
To simplify file name input, S*Basic accepts names as well - Those need to follow the naming conventions (same as variable names) of S*Basic and may thus not contain dots and certain other special characters. Such names are also entered into the S*Basic name table and keep their case while the QL runs.
So, if you got a filename that includes special characters other than letters, numbers and underscore characters like dots, question or exclamation marks and the like, simply enclose it in quotes.
Tobias
A string is typically either a variable of type string (marked by the "$" sign) or a string constant enclosed in single or double quotes. Once you put the string in quotes, S*Basic will accept basically any character in the file name, dots included.
To simplify file name input, S*Basic accepts names as well - Those need to follow the naming conventions (same as variable names) of S*Basic and may thus not contain dots and certain other special characters. Such names are also entered into the S*Basic name table and keep their case while the QL runs.
So, if you got a filename that includes special characters other than letters, numbers and underscore characters like dots, question or exclamation marks and the like, simply enclose it in quotes.
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Dots in filenames?
With SBASIC on SMSQ/E (e.g. with QPC2 emualator) you can now use the fullstop ('.') in SuperBASIC names, and so you also can enter pathnames with fullstop without need for quotes. Albeit I recommend always to use quotes in SuperBASIC, as else every time you use a name, a name table entry is created for each unquoted filename.
http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX
