Hi Paul,
It might help to take a step back and use a simpler example than your actual project to explain what goes on.
Have a look at the screenshot in the attachment which is how the data is actually stored (I use SQLiteStudio - a free download; it's invaluable in helping to understand your data (and therefore your program)).
1. If you are using a type = 'Storefile', then the actual contents of your file / image would be stored in the fields 'writeup' and 'photo' (the red boxes) and the filenames would be null (the blue boxes)
2. If you are using a type = 'Linkfile', then the actual contents are not stored in the database (which keeps it much more compact) and instead the location of the files are written to the 'writeup_filename' and 'photo_filename' fields (the blue boxes).
2a. If you are using the 'copy to' option, then the path to the specified 'copy to' folder plus filename is saved in the 'writeup_filename' and 'photo_filename' fields.
2b. If you are not using the 'copy to' option, then the original location + filename of the file is saved instead.
So, to answer your question, specify a type of 'linkfile' and leave the 'copy to' folder blank. And as it is the same fields that contain the full path + filename irrespective of whether you use the 'copy to' option or not, your script should need little, if any, amendment.
I wasn't sure from your post if you simply want to open the folder where your files are held or whether you want to open the files themselves. So, in the attachment, to cover both cases, clicking on a cell in the 'Write-Up Folder/File' column in the tablegrid will open the relevant folder, clicking on a cell in the 'Photo Folder/File' column will open the actual file (I always use an '*' in the column heading to denote to users that a column is 'interactive'); the syntax for both scenarios is in the script.
Finally, the data in the table obviously points to files on my machine so just delete the rows and replace them with data of your own.
Hope this helps,
Derek.
Post's attachments mini3.zip 399.42 kb, 284 downloads since 2022-03-22