I am getting a strange result using this function.
X$ = "C:\Temp\Test.cfg"
PATHNAME$(NAME, X$) most often returns "Test" but sometimes returns "Test.cfg"
I cannot determine why this does not work reliably. Any ideas?
More detail. The actual X$ is being filled when I am doing a SAVE AS file function. If the SAVE AS is to the current folder, then PATHNAME$ works fine. If the SAVE AS is to a new folder, then PATHNAME$ returns the file name with the extension. Could there be an invisible character in X$ that is causing this problem? Msgbox display shows that the length of the X$ string is correct and it displays as expected. This is driving me crazy.
MORE INFO:
This is most likely a Vista issue. The code works fine if I don't save to C:\temp folder. I can live with that but I would like some way to know that the folder a user selects will or will not be appropriate. I thought perhaps the OFN_NOREADONLYRETURN flag would do this for me but it does not help.
When I check the properties of the C:\temp folder it comes up with "Read only" checked although I can copy files to the folder using Explorer. It lets me uncheck the read only box and apply the change but the change does not stick.
Any suggestions?
X$ = "C:\Temp\Test.cfg"
PATHNAME$(NAME, X$) most often returns "Test" but sometimes returns "Test.cfg"
I cannot determine why this does not work reliably. Any ideas?
More detail. The actual X$ is being filled when I am doing a SAVE AS file function. If the SAVE AS is to the current folder, then PATHNAME$ works fine. If the SAVE AS is to a new folder, then PATHNAME$ returns the file name with the extension. Could there be an invisible character in X$ that is causing this problem? Msgbox display shows that the length of the X$ string is correct and it displays as expected. This is driving me crazy.
MORE INFO:
This is most likely a Vista issue. The code works fine if I don't save to C:\temp folder. I can live with that but I would like some way to know that the folder a user selects will or will not be appropriate. I thought perhaps the OFN_NOREADONLYRETURN flag would do this for me but it does not help.
When I check the properties of the C:\temp folder it comes up with "Read only" checked although I can copy files to the folder using Explorer. It lets me uncheck the read only box and apply the change but the change does not stick.
Any suggestions?
Comment