Hello,
How can I write the output file from a packaged script to the current script folder?
Is there any PrimalScript specific environment variable that I need to parse to get the folder path where the packaged script resides?
Thanks.
Output file to the current script folder
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Output file to the current script folder
What type of script are you packaging?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Output file to the current script folder
It really depends what packaging options you use, but
WScript.Path
should work like in any other VBScript.
Or am I missing something?
Alex
WScript.Path
should work like in any other VBScript.
Or am I missing something?
Alex
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Output file to the current script folder
Please also do not post PrimalScript questions in the Free Tools section.
Use the proper technical support forum.
Use the proper technical support forum.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Output file to the current script folder
I tried to write a log file from the packaged script without any path statement for the log, but the log file is written to the folder where the script extracted the file.
Instead writing the output file to the temp folder to which the packaged script extracted the script file, I want to write the log file to the current folder where the packaged script resides. How can that be done?
Instead writing the output file to the temp folder to which the packaged script extracted the script file, I want to write the log file to the current folder where the packaged script resides. How can that be done?
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Output file to the current script folder
Moving topic to the appropriate forum.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Output file to the current script folder
The best way to do this is to tell the packager not to use the temp folder.
That way you can be sure your script runs in the same fodler as the exe.
That way you can be sure your script runs in the same fodler as the exe.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.