You can get the active 4D folder by clicking on ABOUT 4D when using 4D/4D Server. Look at the last box labeled "4D Folder" and you will see the path. This is not true if you are using 4D Client.
You can also procedurally get the active 4D folder by using the command Get 4D Folder when using 4D/4D Server/4D Client. This folder contains various preferences. Please click on the following link for a full description of that command https://ftp.4d.com/aci_Technical_notes/ACIDOC/CMU/CMU00485.HTM.