Create a folder

Is it possible to create a folder on the desktop, using PHP or HEScript when the software opens, if it doesn’t already exist ?

I’ve had a look through docs and forum but couldn’t find anything of help.


ExeOutput doesn’t have the ability to retrieve the desktop folder path, but with environment variables in PHP, you could do it. For instance, try:

echo getenv("HOMEDRIVE").getenv("HOMEPATH");

Thanks for this. I’ve tried using it for creating a ‘Data’ external folder but it doesn’t seem to work. It does create a folder by a different name though. I need a Data folder to be created when the portable app is run, if it doesn’t already exist.
Does the Data folder need to be created in a different way ?

What is the name of the created folder?

I can create a folder named anything other than ‘Data’. I have an internal folder called ‘Data’. Could this be why I can’t create an external folder called ‘Data’ ?

The “Data” subfolder is where ExeOutput manages its internal PHP files, so it actually already exists virtually. See the documentation about that. It’s possible to change its path and name in ExeOutput’s options.