You are not logged in.
Hi,
I have a powershell script that is downloading files locally from my server.
When I execute this script manually, it downloads these files to its current working directory. i.e. C:\autoscripts\xxx
When I schedule this script via Shutter, it is downloading the files to the program install directory: C:\Program Files (x86)\Shutter
Can I set this somewhere with Shutter?
Thank you.
Offline
Hi dmac, welcome.
I am guessing, executing something by Shutter, sets Shutters' dir to the CWD.
So I would adjust the PoSh script to add the path to the wanted download folder.
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Instead of relying on the current directory being set correctly for your script, you should dynamically retrieve the script's directory and use it to define where your files will be downloaded. In this way you can execute your script with any current directory.
In the Command Prompt you can find out the script's directory via %~dp0 variable.
In the Power Shell there are several different ways available depending on the version, see here:
https://stackoverflow.com/questions/546 … ell-script
Processes that are executed by Shutter will automatically inherit Shutter's current working directory, that is the default behaviour in Windows.
An option for setting the working directory for the "Run Program" action will be available in the next version.
Offline
Thanks guys for the prompt responses.
I have fixed this by explicitly setting the output directory via the script. It was more a powershell script issue than a Shutter one.
Just found Shutter and really like it, will def upgrade to pro.
Thanks!
Offline