Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Spaces in Paths
Message
From
01/05/2012 04:02:01
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
30/04/2012 17:49:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01542915
Message ID:
01542963
Views:
50
>>This tells me that I don't need the quotes in
>>commands that can take a name expression.
>>
>>In addition, I was hoping someone would know off-hand
>>if it is also the case in all commands that
>>have a file name or a file skeleton as a
>>parameter.
>
>Commands and functions don't take "file names" or "file skeletons" as parameters, they take strings. The rules for file name/skeleton parameters are no different from the rules for strings.

...but there are stricter rules for strings which are filenames - they can't contain just any bytes, they can't be null, there's a length limit imposed by the filesystem, etc etc.

My rule of thumb is that any string that holds a regular filename is a good filename string :). This means that it can't contain a quotation mark, asterisk, question mark, colon (except in position 2 if position 1 holds a disk letter), pairs of backslashes (except before a servername in a UNC address), multiple leading or trailing spaces... did I forget anything?

The quotation marks around a filename string are not part of that string, they are delimiters required for the command where that string is used, and I never make them a part of that string. If I have a filename in a variable or an expression, I use name expressions, period. Macros? Not for filenames.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform