[Closed] Getting the original file location of a mzp drop file
Hi guys.
I’ve written an installer which uses a .mzp drop file.
The installer prompts the user for a particular folder1* on the users machine where a bunch of stuff is to be installed.
The .mzp installer should be located (but not always) two folders deep within the desired folder1*.
I’m thinking there should be a way to fill the default section of the following getSavePath with the folder two levels above the droped .mzp file
getSavePath caption:“Please locate and select the X folder.” initialDir: “folder1*”
Note. The installation location of folder1 on different users machines may differ, so I cant hard code the default folder path.
So…
X:/folder1*/folder2/folder3/installer.mzp is the location of the installer.mzp
and the installation script needs to know where folder1* is.
Is there a way to find out where a .mzp has been dropped from?
Thanks in advance.
AdamM
What about something like this?
dir = getFilenamePath(getSourceFilename())
Problem with that one is that it shows the location of the file as it has been unzipped into the system temp directory :(. I need to know the location of the original mzp.
When you drag an mzp onto max window it unzips everything into the system temp, then runs the scripts defined in mzprun.
Thanks though.