# File SaveAs does not change Analysis working directory

**URL:** <https://prepomax.discourse.group/t/file-saveas-does-not-change-analysis-working-directory/93>\
**Category:** Bug Reports\
**Created:** [March 1, 2022, 11:48pm UTC](https://prepomax.discourse.group/t/file-saveas-does-not-change-analysis-working-directory/93 "2022-03-01T23:48:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![datsnl](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@datsnl](https://prepomax.discourse.group/u/datsnl)\
**Post date:** [March 1, 2022, 11:48pm UTC](https://prepomax.discourse.group/t/file-saveas-does-not-change-analysis-working-directory/93/1 "2022-03-01T23:48:49Z")

</div>

Hello,

My second post here so please let me know if I am not doing something right.

My folder structure is as follows:

1. Project Folder that has step files and other case folders  
1.1 Case 1 Folder  
1.2 Case 2 Folder  
…

In Tools → Settings → General, I have Save results in .pmx file to “No”  
In Tools → Settings → Calculix, I have Use .pmx folder as work directory set to “Yes”

Steps to recreate this issue:

1. Open PrePoMax version 1.2.0 and conduct FE analysis in Case 1 folder and get results.
2. Click File → SaveAs and save a new pmx file “Case2” in folder Case 2
3. Make required changes to the file and make it ready to run analysis
4. Right Click Analysis-1, select “Edit” and check parameters for Analysis-1
5. Work Directory still shows Case 1 folder.
6. Close PrePoMax
7. Open PrePoMax again
8. Open Case 2 pmx file and check Working Directory, now it shows Case 2 folder.

Due to above settings, my Case 1 files are getting re-written when I conduct analysis for Case 2.

Can the working directory for Analysis be changed to the location of pmx file on SaveAs?

Kind regards  
Dharmit

---

<div class="post-metadata">

**Author:** ![mkraska](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@mkraska](https://prepomax.discourse.group/u/mkraska)\
**Post date:** [March 3, 2022, 10:54am UTC](https://prepomax.discourse.group/t/file-saveas-does-not-change-analysis-working-directory/93/2 "2022-03-03T10:54:24Z")

</div>

If the working directory is changed in the context menu of the model tree, then I’d expect this to be a per-model setting, possibly overriding the global setting (be it a fixed directory or the location of the current pmx file).

Yet this would make the pmx files non-portable. On the target system, this directory might not exist.

I agree that switching pmx file should also update working directory (given that option is active) no matter how the pmx file was changed in a prepomax session (by opening another pmx file or by save as).

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [March 6, 2022, 2:15pm UTC](https://prepomax.discourse.group/t/file-saveas-does-not-change-analysis-working-directory/93/3 "2022-03-06T14:15:39Z")

</div>

I can confirm it is a bug. The analysis folder is not updated when the file is saved to a new file name. When the file is Open-ed then the analysis folder is updated. I have fixed this bug in the current developer version.

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [March 6, 2022, 2:15pm UTC](https://prepomax.discourse.group/t/file-saveas-does-not-change-analysis-working-directory/93/4 "2022-03-06T14:15:44Z")

</div>


