Hi again,
I'm having an issue with Client.WorkingDirectory
I'm running a script that places files into a folder "Audit Data".
As part of this script it opens one of these files, places a URL into a field, creates this as an action field, and then looks to another macro to invoke I Explorer
If I put the full path of the second macro into the script it works a dream. However, the macro will be used by different people and so the path will change.
I can't use the working directory as the macros.ilb folder is back one level i.e. my working directory is IDEA\Audit Data.ilb and the macros are in IDEA\macros.ilb
I know that ChDir".." will allow me to move up one level
However, I can't figure out how to move down one level
Any help would be greatly appreciated.
thanks again,
Phil
pcallan0
Offline
Last seen: 1 week 2 days ago
Joined: 02/21/2017 - 07:17
Hi Phil,
Just to make sure I understand this. So in the action field that you create it is referencing a script to open up the URL and because of the locations of the files you are having a hard time mapping the location of the script.
So my question is would the location of the script always stay relative to your folder. So would it always have the following structure:
IDEA\Audit Data.ILB
IDEA\macros.ILB
So the file would be created and stored in IDEA\Audit Data.ILB but the macro it needs to reference would be IDEA\macros.ILB, would Audit Data.ILB and macros.ILB always be the same folders?
Let me know and I should be able to help you out.
Brian
Hi Brian,
That's exactly it.
The script creates a folder "audit data", import files and moves them into the folder, and then does a series of summarizations, extractions etc.
So the working folder will always be IDEA\Audit Data.ILB and the macro folder will always be IDEA\macros.ILB
Thanks,
Phil
Hi Phil, here is some code for you. The script first gets the full project folder path and then removes the project folder. It then adds the Macrol.ILB info to the folder info along with the script name and finally adds this info to the action field. Let me know if you have any questions.
Brian
Hi Brian,
My apologies, I thought I had responded to your last message.
the script worked for me.
Thanks a million,
Phil
No problem, glad that the script worked for you.
Brian