I bet you are using macro substitution when it's not necessary.
The Name expression will work much better
SET DEFAULT TO (cDirectoryName)
CD (cDirectoryName)
>
>I created a few folders which must contain costumers' Excel's files.
>
>For example:
>
>D:\COSTUMERS\PETER\SENT
>D:\COSTUMERS\JOHN\SENT
>D:\COSTUMERS\BILLY THE KID\SENT
>
>I chose a client and I want to open one of the Excel files. I use "GETFILE()" function. If I don't set the folder as default the function forces the user to browse every time he wants to open that file.
>
>When I "SET DEFAULT TO" any of the two first examples I love myself for my intelligence... But when I "SET DEFAULT TO" the third one I hit my head against the table...
>
>I guess the blank spaces among "Billy the kid" is the problem. I don't know why "MD Billy the kid" works and "DIRECTORY("BILLY THE KID") too but not "SET DEFAULT".
>
> I know I can solve this with STRTRAN(cDirectoryName," ","_") but perhaps any of you knows another more honourable solution.
>
--sb--