The test is very simple - I created a ne application with a single file that had a specific file name and used the app wizard to create/run the it - it fails when trying to browse the file with error of path not found. The site will not let me upload the solution
This is the code I use, using C6 and it works here. It should work for you as well. Modify to taste and your systems. I am using the Clarion native FileExists and CreateDirectory command found in CWUTIL.:
!=====================================================================================
PCREATEDIRECTORY PROCEDURE(STRING PUNCDIR)
!=====================================================================================
CODE
IF FILEEXISTS(PUNCDIR & '\*.*') = TRUE
RETURN
END
CREATEDIRECTORY(PUNCDIR)
IF ERRNO()
BEEP
MESSAGE('Error Creating Directory using PCreateDirectory() in PUNC.clw: ' & PUNCDIR & ' Error: ' & ERROR() & ' ErrNo: ' & ERRNO(), 'Error Creating Directory', ICON:EXCLAMATION)
END
This is very similar to what I am already using, except I use VuFileUtility to create directories. This works fine on Win 7 but on Win 10, will not create the folders
It looks like SV is aware of this. The CREATEDIRECTORY help has the following:
On some Windows versions, any attempt to create multiple levels of directories
(For example. ‘C:\dir1\dir2\dir3’) will fail, but the error code will not be returned correctly. CREATEDIRECTORY will still post a non-zero value, which you can use to trap and post a generic “Directory Not Created” error.
It looks as if Microsoft are aware of the problem - I have seen some of the “new” security settings in the next release of Win 10 and there is a new setting to switch of the security that is blocking folders being created in apps