BatchMethods

Maybe it can be done and i missed it, or others have mentioned it and I missed that as well.
Can you have methods say 5 active in the left panel and load a saved set of methods without losing the current active methods.
If no way to do this will you think about adding this to a future release


Thank you
Reply to #1:

Hi Hobbs,

I'm pretty sure there's no way to do that directly; maybe there is and I just haven't noticed (not impossible, believe me). It *is* possible to join two v4.x .aren files in a text/program editor, but I STRONGLY caution you to do that only with backed-up .aren files, and very carefully. If you're not used to working with raw data files and you are not a detail-oriented person I'd say skip it, and OF COURSE don't blame me if your results are, shall we say, suboptimal. Not that it's really that hard, I just feel like I have to scare you a little so you'll be careful. :) Also, don't use a word processor to do this unless you know why I just cautioned against it. :)

In Notepad++ or similar, open your two v4 .aren files in two windows side-by-side (they don't have to be side-by-side but it's easier that way). Go to the bottom of the file you want to be first in the batch and remove the

]
}

at the very bottom of the file (note: they'll be indented. Add a comma after the last "}" remaining and make sure there's *one* blank line after that comma.

In the second file go to the top and remove everything up to and including

"methods" : [

at the top of the file. Copy the remaining second file (Ctrl+A Ctrl+C), and paste it into the first at the very end on that blank line I mentioned. Save under a new name with the usual .aren extension and try it out. If you screw up you *may* get a helpful little popup that tells you what line you screwed up on, and how; maybe not. If you've followed my instructions you haven't destroyed any pre-existing files, so you can always go back and try again.

I know this reads as a little complicated at first, so I suggest if you want to try it you make two test batches with one or two methods and play with those first. It gets easier the more you do it, of course.

Best,
DF
Reply to #2:
Thanks DF, and am sure from time to time that can and well work, just maybe with the author who mentioned that many new things are coming this could-would be one.

Thanks again
Reply to #3:

Absolutely my friend. From your lips to Kim's ear... :)

Certainly my method is a kludge, and not really for everybody. I've been using it for years, since v3 (harder to do) and it's worked fine. But you are right, let's hope for the best possible solution.

Best,
DF
Reply to #2:
Huh. Looks like he switched from saving INI files to JSON.

Either way, it should be trivial to write a script/exe to merge two *.aren files if this is ever needed.

In fact, I just checked and there are already lots of online tools to merge JSON -- with varying usefulness.
Reply to #5:

I agree, even though I'm not sure .aren files are exactly JSON, maybe more JSON-adjacent. But I could be wrong, I don't have much experience with JSONs.

A while back I wrote an AutoHotkey 2 script to "expand" the v3 .aren files into human-readable files. I never got around to writing the reverse converter because I found I hated AHK's weird flavor of regex. But it was useful for figuring out what I'd done in the files after being away from them (much faster and more comprehensible to look at a flat file with all the information there instead of opening each method in turn in ARen. Now with the new file structure it's hardly necessary, since they are laid out nicely already.

Anyway, it's so easy to manipulate the v4 files in a text editor, I never thought of trying anything like a program to do anything.

Not a bad idea though... :)

Best,
DF
Reply to #6:
I just checked and both my (highly "scientistic") sample of two *.aren contents++ fully validate as Valid RFC 8259 JSON. ;)



++ I don't use version 4 yet for anything other than some tests
Reply to #7:

Good to know and doesn't really surprise me. And it shows how little I know about that. My background is Informix/awk/sed/UNIX/VAX/C/CP-M and of course PCs and Macs back in the day. (I was in the room the first time the engineers at IBM-Austin got to open the hood on their first brand new IBM-PC in 1982 or so. That was a hoot. ) Haven't worked in the field since 2002 or so, so I'm just not really up on these new-fangled concepts. :) I only dipped my toe into javascript because I wanted to do more with this program, and Mike Lee had lots of interesting scripts here on the forum.

But I digress. It should be really easy to read a JSON into pretty much any programming language and manipulate it as an array/dictionary/whatever. Like I said, it's easy enough just to cut/paste, but I guess some folks might want something different.

It's interesting you haven't converted to v4. I still use v3 a lot, and do almost all scripting there first because the error messages are more useful. Also I want my stuff to run in both so I start with v3 (which won' t even allow a "let" statement). :) If I need to use the new file-reading commands I guess I'll have to write in 4, but until then I'm very comfortable with 3. Also, I used a UI tweaker a while back and now even though I uninstalled it none of my standard Windows dialogues (you know, stuff like 'save file', 'save as', 'load file', etc.) show up. Nothing but radio silence. Since v3 uses a non-windows save and load it's the only way I can save a file in ARen right now, and I'm too lazy to reload Windows.

Anyway, thanks for the information, keep a good attitude my friend...

Best,
DF
Reply to #8:
I have built up a wide variety of tools/scripts that handle most of my (re)naming needs. And DOS batch, PowerShell, bash, and PowerRename for quick ad-hocs. Although Aren is now my go-to for quick one-offs.

I bought Aren when I started needing to change file dates a lot. Date wrangling is its main purpose, for me. And, sadly, version 4 does not yet do that.


Yeah, I remember not being impressed by the PC in 1982 - despite messing about with TRS-80, Apple, Commodore, Kim, and Compucolor machines.

But the floppy drives were great when they came out. All of my computer learning started with punch cards and paper tape.

>> Anyway, thanks for the information, keep a good attitude my friend...

You too.

Regards,
RW
Reply to All

Are we not allowed to post-paste scripts here, was trying to paste a python script to merge two Methods but i received 'An error occurred", many times.

It's cool if that's the rule, am an old hippy so i leave you with this "sign sign everywhere a sign... .
Reply to #10:

Hi HOBBS,

I'm not aware of any such limitation. On the other hand, I did a search for "python" and didn't find any scripts, so maybe I'm wrong.
---------------------
files=['my.json','files.json',...,'name.json']

def merge_JsonFiles(filename):
result = list()
for f1 in filename:
with open(f1, 'r') as infile:
result.extend(json.load(infile))

with open('counseling3.json', 'w') as output_file:
json.dump(result, output_file)

merge_JsonFiles(files)
---------------------

...is a Python script I found on stackoverflow with a simple DuckDuckGo search (first item).
EDIT: As always, use at your own risk... END EDIT
EDIT 2: There are a number of threads with, win batch files pasted in, for example,
https://www.advancedrenamer.com/forum_thread/where-is-the-ou tput-path-15703
END EDIT 2

Best,
DF
Reply to #11:
Awesome, i did not create the script, it was made by chatgpt, but i did test it over and over and found no problems. It will only merge two at a time but if you wanted you could keep merging.
so 10-4 Delta and that duckduck script is very short compared to mine, no, chatgpt's script, and, really it works very well. take care.
Reply to #12:

...de nada, amigo! :)

I bet an actual PERSON wrote *that* script! :)