#1 2020-07-23 06:22

Andrew-HOD
Member
Registered: 2020-01-08
Posts: 7

Setting Folder Location

Hello,

Is there a way to set where the folder that stores Presets etc is?  I want to move out of Documents to a different folder.  I cannot find a setting for this.  Hopefully it is easy and not so obvious that I feel stupid (but ready for that)

Thank you,
Andrew

Offline

#2 2020-07-23 15:02

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Setting Folder Location

SETTINGS managed by ReNamer are stored in a dynamically determined location.

Here are some collected postings by den4b:


For the PORTABLE version all settings, scripts, translits and presets
are stored in the same location as "ReNamer.exe".
(Same for the ReNamer Installer version before v6.0)


For the INSTALLER version a user profile directory is used by default,
"C:\Users\YourUSERNAME\Documents\den4b\ReNamer\"
or whatever is configured in the "Storage.ini" file
located in the same folder as "ReNamer.exe".


You can override the location of all stored settings by replacing the content of "Storage.ini" file
(just create the ini if it doesn't exist) with a desired path, for example:

Storage.ini example lines:
D:\My Data\ReNamer\


And even environment variables are resolved since v6.4:
%APPDATA%\ReNamer\
%USERPROFILE%\ReNamer

Important: the "Storage.ini" should NOT contain the string "#USER#" any longer,
if it is still there, remove it and write in the path to the wanted settings folder.

There should be only one line in the "Storage.ini", the path to the wanted settings folder without "..." quotes.
That path is the root path for all settings:
Settings.ini and ReNamer.ini, Language, Presets and Translits folder.

Tested: path work with, and without trailing backslash\, and paths which contains spaces must not be enclosed in "quotes".





If you want to store presets and all other settings in the same folder as "ReNamer.exe",
then you don't need "Storage.ini" file at all, just delete it.
That is the default operation of the portable version.


The Text file "Storage.ini" file is what makes ReNamer use user profile directory for the installer edition.
So you could delete that ini file to have all settings in the same location as "ReNamer.exe".
Or modify the path to the storage folder in that INI, as shown above.



P.S. The existing settings will not be migrated automatically, so you'll need to move them manually if you want to keep using them.
If you want to continue to use the old settings, you have to move the settings by hand from the old location in addition to deleting or modifying the ini.
If you use the Installer, ReNamer will do that for you (see "Migration.log")



But keep in mind you will need to have write access to the application folder or to the new settings folder,
in case he is located inside of the by Microsoft UAC protected folders like "C:\Program Files\"
else Windows shows error as the following:
    Failed to save a preset.
    Unable to open file "C:\Program Files\ReNamer\Presets\Capitalize.rnp"

"Program Files" is write protected by Windows UAC.




- - - Example Migration.log found on the forum:

Migration initiated at 5/23/2016 7:54:58
Source directory: C:\Program Files (x86)\ReNamer\
Target directory: C:\Program Files (x86)\ReNamer\Presets\
Copy from: C:\Program Files (x86)\ReNamer\ReNamer.ini
Copy to: C:\Program Files (x86)\ReNamer\Presets\ReNamer.ini
Copy result: OK
Copy from: C:\Program Files (x86)\ReNamer\Presets
Copy to: C:\Program Files (x86)\ReNamer\Presets\Presets
Copy result:  FAILED
Copy from: C:\Program Files (x86)\ReNamer\Scripts
Copy to: C:\Program Files (x86)\ReNamer\Presets\Scripts
Copy result: OK
Copy from: C:\Program Files (x86)\ReNamer\Translits
Copy to: C:\Program Files (x86)\ReNamer\Presets\Translits
Copy result: OK
Rename from: C:\Program Files (x86)\ReNamer\Presets\ReNamer.ini
Rename to: C:\Program Files (x86)\ReNamer\Presets\Settings.ini
Rename result: OK


 


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

#3 2020-07-24 05:49

Andrew-HOD
Member
Registered: 2020-01-08
Posts: 7

Re: Setting Folder Location

Hello,

Sounded easy enough, but I did this:
in C:\Program Files (x86)\ReNamer a file called Storage.ini I did this

#USER#
%APPDATA%\ReNamer

Every time it starts it says "You are launching for the first time" and it does not seem to create folders or anything. 

Am I missing something?

v7.2, registered user!

Offline

#4 2020-07-24 07:06

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Setting Folder Location

Yes, I can confirm that:
- have created a file "Storage.ini" in the folder with ReNamer.exe (didn't use Installer here)
which contains a path to another location
- start ReNamer
- the wanted storage folder from "Storage.ini" is created
- but not used, I always get that both "welcome" messages
- even if I copy my old "Settings.ini" and "ReNamer.ini" into that new folder
(and the folder Language, Presets and Translits too)
- Also, settings made in ReNamer are not remembered that way
- Only if I rename the "Storage.ini", the old "Settings.ini" is taken and settings are stored again.
Tested on win10 with 6.8 and 7.1


I will see if I find some more information what is missing here, tomorrow I can test the installer myself on another PC.


Here is the same issue
Settings not remembered in Win 10? >> https://www.den4b.com/forum/viewtopic.php?id=2231



den4b, it would be nice if ReNamer would show the currently used ini-location in the About-dialog, as like TotalCmd does.



 


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

#5 2020-07-24 16:11

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Setting Folder Location

I have found it:

Storage.ini should NOT contain "#USER#" any longer.

%APPDATA%\ReNamer

Sorry for the confusion. I have updated my post above.


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

#6 2021-02-12 01:35

vertigo
Member
Registered: 2019-03-10
Posts: 7

Re: Setting Folder Location

To add to this, while %userprofile% apparently can't be used, %username% can be. So you can't do %userprofile%\Documents\... but you can do C:\Users\%username%\Documents\...

Offline

#7 2021-02-12 20:02

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Setting Folder Location

vertigo wrote:

To add to this, while %userprofile% apparently can't be used, %username% can be. So you can't do %userprofile%\Documents\... but you can do C:\Users\%username%\Documents\...

That doesn't sound right. The %USERPROFILE% can be used, like any other valid environment variable.

Just tested in Windows 10, set the path in Storage.ini to %USERPROFILE%\ReNamer\ and it worked as expected.

Perhaps there is some misconfiguration in your system. Check if you can access this environment variable from the command prompt by executing:

echo %USERPROFILE%

Also, for the reference:
https://www.den4b.com/wiki/Application_Data_Storage

Offline

#8 2021-02-12 20:09

vertigo
Member
Registered: 2019-03-10
Posts: 7

Re: Setting Folder Location

I use it all the time, so it's definitely configured right. Maybe I did something else wrong, and just assumed it was because of that due to what was said about using "#user#" and didn't troubleshoot, though I see now that was just a comment in the file, not the environment variable. I'm actually using %appdata%, so it's a moot point for me. Since it works for you, it should work for everyone else, so that's what matters.

Offline

#9 2021-02-15 19:50

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Setting Folder Location

vertigo wrote:

Maybe I did something else wrong, and just assumed it was because of that due to what was said about using "#user#" and didn't troubleshoot, though I see now that was just a comment in the file, not the environment variable.

The "#USER#" part is not a comment, it is a meta tag of a sort. It stands for a vendor specific folder structure in the user profile directory, and that is used by the installer version by default.

The entire content of the Storage.ini file is interpreted as a path for storing the application data, so just make sure that you have nothing else there except a valid path.

Offline

Board footer

Powered by FluxBB