![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
This should be simple. As a compiled task (.EXE) is being run, I want this task to get the current directory's (folder) full path from where it is being run. This is very important because the deployed tasks need to access accessory data test files (word, powepoint,etc) that reside in sub-folders. Example: w:\Coretests\EXE\Wordtest.exe w:\Coretests\EXE\Exceltest.exe w:\Coretests\Testfiles\Word2003.doc w:\Coretests\Testfiles\Excel2003.doc The wordtest.exe task will look for ..\testfiles\WOrd2003.doc in the sub folder but w:\coretests CANNOT be "hard coded" within the task. This is because the task will be deployed to multiple locations. Thats why I need the current directory. In vbs it can be done with: shell = Shell.ExpandEnvironmentStrings("%windir%") currentdirectory = shell.currentdirectory That script works but it's location needs to be hard referenced when included in a task so it defeats the purpose. I'm sure A. Anywhere has an easy solution. I just overlooked it. Thanks. We are deploying tasks that are designed to access "tests files" that are in the same folder Please don't say $currentdirectory$ because this is useless. I want to run a compiled task |
| |||
|
Hello, You can create a VB script to get the path of file and that can be assigned to the AA variable. You need to use Run Script command to execute the VBScript. From version 5.0, if task includes Run Script action, the script is also included in Exe. This will make it easier to port complex automation across many computers even tasks include external scripts. Hope that helps. |
![]() |
| Thread Tools | |
| Display Modes | |
| |