Getfolder()
Moderator: Rathinagiri
-
- Posts: 22
- Joined: Wed Dec 20, 2017 8:29 am
- DBs Used: DBF
- Location: Belgium
Re: Getfolder()
Serge,
The folder path/name is ok (I have a multi language PC!).
I have tried C:\users\Administrateur\ and others folders not in Gebruiker : no problem.
Now, I see a padlock on Gebruiker.
However, I can read/write in the files and subfolders of the folder Gebruiker.
But the access seems blocked (only) for my application : strange!
I have tried to unlock Gebruiker in the properties, without result : it remains locked.
I continue to search for the why.
Dominique
The folder path/name is ok (I have a multi language PC!).
I have tried C:\users\Administrateur\ and others folders not in Gebruiker : no problem.
Now, I see a padlock on Gebruiker.
However, I can read/write in the files and subfolders of the folder Gebruiker.
But the access seems blocked (only) for my application : strange!
I have tried to unlock Gebruiker in the properties, without result : it remains locked.
I continue to search for the why.
Dominique
Re: Getfolder()
Start application in "Run as Administrator" mode and check if you have access to this folder.
-
- Posts: 22
- Joined: Wed Dec 20, 2017 8:29 am
- DBs Used: DBF
- Location: Belgium
Re: Getfolder()
To which the user corresponds to the name "Gebruiker"? Will it be: Default, Default User, All Users, Public or is it called a local account in Windows?
What is the operating system?
What is the operating system?
-
- Posts: 22
- Joined: Wed Dec 20, 2017 8:29 am
- DBs Used: DBF
- Location: Belgium
Re: Getfolder()
Hi edk,
The OS is win7
The path is C:\Users\Gebruiker
The users are : Getfolder() returns the initpath for all folders (and subfolders) except for the folder Gebruiker and its contents.
I have tried to unlock Gebruiker (10 minuts!) but the padlock stay there.
Dominique
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Getfolder()
Strange. It must be a naming problem. Edward, what do you think?
Serge
Serge
There's nothing you can do that can't be done...
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Getfolder()
Could this "locked" symbol be pointing to something?
Viva HMG
Viva INTERNATIONAL HMG
Re: Getfolder()
It seems to me that, the padlock is not the reason for this behavior of the GetFolder function here.
The C:\USER\Gebruiker folder is in this case a profile folder.
In order for GetFolder to work with this folder, it should be possible to display the profile folder in the window.
Try this code, it works on Windows 10 for me:
The C:\USER\Gebruiker folder is in this case a profile folder.
In order for GetFolder to work with this folder, it should be possible to display the profile folder in the window.
Try this code, it works on Windows 10 for me:
Code: Select all
#include "hmg.ch"
#define plik_ini "demo.ini"
PROCEDURE MAIN()
Local cPath:=""
BEGIN INI FILE (plik_ini)
GET cPath SECTION "Main" ENTRY "Path" DEFAULT ""
END INI
IF EMPTY(cPath)
BEGIN INI FILE (plik_ini)
SET SECTION "Main" ENTRY "Path" TO "C:\"
END INI
ENDIF
DEFINE WINDOW main_form ;
AT 110,220 ;
WIDTH 335 ;
HEIGHT 260 ;
TITLE 'Test';
MAIN;
NOMAXIMIZE ;
NOSIZE
DEFINE MAIN MENU
DEFINE POPUP "&File"
MENUITEM "&Get Folder" ACTION GetFld()
MENUITEM "E&xit" ACTION Main_form.Release
END POPUP
END MENU
END WINDOW
Main_form.center
Main_form.activate
RETURN
//--------------------------------------------------------------------
FUNCTION GetFld()
Local cPath:=""
BEGIN INI FILE (plik_ini)
GET cPath SECTION "Main" ENTRY "Path" DEFAULT ""
END INI
msgbox('InitPath for GetFolder(): ' + cPath )
cPath := GetFolder ( 'Get Folder' , cPath, , .T. /* [<lNewFolderButton>] */, .T. /* [<lIncludeFiles>] */, CSIDL_DRIVES + CSIDL_PROFILE /* [<nCSIDL_FolderType>] */ )
IF EMPTY(cPath)
RETURN Nil
ENDIF
msgbox('Selected Path by GetFolder(): ' + cPath)
BEGIN INI FILE (plik_ini)
SET SECTION "Main" ENTRY "Path" TO cPath
END INI
RETURN
*****************************************************************
Re: Getfolder()
Tal vez en Seguridad...
En la carpeta oprimir Boton derecho / Propiedades / Seguridad
------------------------------------------------------------------------------
Maybe in Security ...
In the folder, click Right button / Properties / Security
En la carpeta oprimir Boton derecho / Propiedades / Seguridad
------------------------------------------------------------------------------
Maybe in Security ...
In the folder, click Right button / Properties / Security
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
-
- Posts: 22
- Joined: Wed Dec 20, 2017 8:29 am
- DBs Used: DBF
- Location: Belgium
Re: Getfolder()
edk wrote: ↑Wed Apr 11, 2018 2:22 pm It seems to me that, the padlock is not the reason for this behavior of the GetFolder function here.
The C:\USER\Gebruiker folder is in this case a profile folder.
In order for GetFolder to work with this folder, it should be possible to display the profile folder in the window.
Try this code, it works on Windows 10 for me ......
Thanks edk,
Getfolder() with your parameters work very fine!
Good to know!
Thank you very much for your help.
Dominique