Nope. ADIR puts the file name into an array but RENAME, ERASE, FILE and FOPEN fail even using the parenthesised variable method.
>
VFP has three ways to delimit texts: double quotation marks, single quotation marks, and []. Thus, if a text contains single quotation marks, you can use double quotation marks on the outside, or vice-versa.
>I think if you use a variable for both the source name and the destination name, the following should work even if the filename contained spaces or quotation marks:
>
>>rename (source) to (origin)
>
>
>Hilmar.
>
>>The client is using a terminal into their mainframe and doing a screen dump into a text file. I don't know the OS. Probable an IBM mini circa early 1980.
>>
>>>I am curious how they created a file name with a preceeding space.
>>>It is not possible at least in Windows NT where I am this moment.
>>>
>>>>Manually. I had a problem like this where I was receiving files from a client with a space as the first character. The only way I found to fix the name was to manually remove the space through Windows Explorer Rename. I could not open the file from VFP but I didn't really try beyond the first error message. You could try ERASE ( filename with space.txt). Include the parenthesis.
>>>>
>>>>I beleive that a file with a preceeding space is actually an illegal windows filename but Windows allows manipulation through the explorer.
>>>>
>>>>By the way, does your company offer offsite backup services?
>>>>
>>>>
>>>>>How can I rename a file with a space in it? Is there a function that will do this, or will I have to delete the file and create a new one?