My attachment files polling to the ‘Target directory’ as a normal practice. But i wanted to poll into ‘Start in’ directory path. Hence i would need to locate/find the ‘Start in’ directory path. Your suggestions would be much appropriated in advance. Thanks
You can get the current directory at anytime using LONGPATH() or PATH()
So call either of those before you change directories to get the start in path.
On a semi related subject:
You can call COMMAND(‘0’) to get the path of the program that’s running.
( note: that’s a zero )
Help[ Command ]
“…
A flag of ‘0’ returns the minimum path the operating system used to find the command.
…”
I’m not sure to understand what you are looking for, but it looks like you’re trying to read the data from the shortcut (right click on the program icon placed on the desktop, then click on properties)
These shortcuts are .lnk files, I’m not sure we can open them easily and read their content…
the program does not know nothing about the shortcut, it is the shorcut which knows where the program is located and where (in which directory) it should start.
From another point, we can tell our Clarion programs where the data is located using the SYSTEM{Prop:DataPath} property.
From the help file
PROP:DataPath
A read/write SYSTEM property that can be used to set the default directory for data files.
All files with unqualified file names (e.g., those files with no NAME attribute or a NAME with only a relative path) will be looked for in the directory specified by SYSTEM{PROP:DataPath}.
SYSTEM{PROP:DataPath} defaults to the directory the application starts in. This will save developers from having to do startup code like the following: