Hi, I am first time user and get the following error when using PS v3.1
After adding transactions to the
PortfolioSlicer-Source and got in the
PSDataExtract to run the
updatePSData, UpdatePSDataFromExcel and UpdatePSDataIntraday. This is when I get "command not found exception" error. See attachment.
Appreciate your time in looking into this for me.
Thank You
Comments
How are you executing .bat script? Are you opening windows explorer, going to the folder where .bat file is, confirming that there is a subfolder Scripts with .ps1 files?
1. Start UpdatePSDataFromExcel.bat
2. As soon as the previous step started press CTRL+C and post here screenshot of you cmd.exe file.
I am expecting that first line in script execution will show where this script starts, example from my execution:
In your case I expect that first line will be:
c:\PortfolioSlicer\PSDataExtract powershell ....
c:\WIndows\System32
For some reason when you execute .bat file, it does not "registers" the location from where it starts. I have seen this happens when one executes "shortcut" to .bat file, instead of executing directly .bat file.
It might be related to the fact that you execute this as "administrator" and that changes location.
In any way, easiest solution for you would be to add following 2 lines to the top of your .bat files:
cd \PortfolioSlicer\PSDataExtract
These 2 lines first set environment to the location of the .bat files and then script should run fine.