Author Topic: How can I change the location of .save file(autosave)?  (Read 4400 times)

Offline photon3108

  • Multiple posting newcomer
  • *
  • Posts: 32
How can I change the location of .save file(autosave)?
« on: February 01, 2010, 04:06:33 am »
I like autosave because it saved me many times from testing new nightly build of CodeBlocks.

But it makes the source's list longer, I think that I should put all .save files in the "../save_folder".

Does anyone know how to do that?

Thanks.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: How can I change the location of .save file(autosave)?
« Reply #1 on: February 01, 2010, 07:40:12 am »
Does anyone know how to do that?
As this won't work if you have several files with the same name in a project (just in different directories) it's very unlikely that this will be implemented. However, you can adopt the AutoSave plugin yourself and just add a "../save_folder" in front of the save command.
Search for:
Code
if(::wxFileExists(filename) && ::wxCopyFile(filename, temp))
...and adjust as needed.
However, you need to ensure the target path exists.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline TerryP

  • Multiple posting newcomer
  • *
  • Posts: 26
    • My journal
Re: How can I change the location of .save file(autosave)?
« Reply #2 on: February 01, 2010, 10:47:38 pm »
One idea would be implementing some form of file name mangling based on variables, so it's possible to use such a folder for the saves without file name collisions; although ofc that would ruin any 8.3 limits you might need, but that's not likely a concern.
Just Another Computer Geek

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: How can I change the location of .save file(autosave)?
« Reply #3 on: February 02, 2010, 08:35:59 am »
One idea would be implementing some form of file name mangling based on variables,
You can also just leave it as it is (which won't conflict) and use a file manager that allows to hide file names with specific extensions. That's how I do it.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ