topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 4:09 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Semi-Automated file naming  (Read 12251 times)

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Semi-Automated file naming
« on: June 03, 2007, 01:40 PM »
Hello to all,

I’m trying to use a specific naming protocol for all my documents, but... I often fail to apply it consistently and properly when I'm in hurry or just working on too many things at the same time. So I'd like to automate it in some ways.

Example : when I save a document, it would offer me different fields, separated by columns dots periods** [sorry... still learning!] or other appropriate punctuation marks : type of document, author, title, date, keywords... And the final name would appear almost like an "MLA" or "Author-Date" formatted reference

Example such a formatted name : "CB-TH-Amado, Carlos Augusto Agon. 1998. OpenMusic.doc"
(in my example "CB-TH-" means "complete book" and "Thesis"; "Amado, Carlos Augusto Agon" is of course the author; 1998 is the date; and "Open Music" is the title.)

There might be ways to do that, or there might be an "Open/Save Dialog Box Extenders" software which could do that... I don't know...

Any ideas?

Thanks

** Not a good idea, it seems. Please see https://www.donation...dex.php?topic=8820.0
« Last Edit: June 10, 2007, 06:07 PM by Armando »

Hirudin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 543
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #1 on: June 03, 2007, 03:11 PM »
A couple ideas:
You can use a form filler, like KeePass. Make a bunch of entries for the Save dialog window that you can use like templates. Make a new entry for each different type you want to have and name them accordingly.
"Complete Book Thesis" could auto-type: "CB-Th-Auth Name. Date. Doc-name"
"Partial Book Editorial" could auto-type: "PB-Ed-Auth Name. Date. Doc-name"
etc.
Then after it auto fills the template format you could manually go in and change the author's name, date, and whatnot.

You may also be able to make an AutoHotkey Auto-Replace script that would fill in the formatting for you. (I suppose this could save some time, but it seems that in the end you wouldn't save many keystrokes.) This would be better if you actually wanted to type "CB" but have the phrase "Complete Book" be transcribed.

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #2 on: June 03, 2007, 03:25 PM »
Would be good for an coding snack!
Basically an interface that renames files based on the data in the summary tab and a user defined scheme of how to translate the metadata to a filename (first letter of each word).

A bit like Tag&Rename (this is a program to rename mp3s based on IDtags).

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Semi-Automated file naming
« Reply #3 on: June 03, 2007, 03:38 PM »
i think a good solution to this would be not to focus on the save dialog, but instead think about a generic tool that can pop up with a hotkey and let you fill out a little form with checkboxes or fields, whatever, and then create some text matching a template you design, and copy it to clipboard or paste it in your active program.  then you could use it for save dialog or when renaming, or whatever.

You could use my "Form Letter Machine" program for something like this, though i hardly think it's ideal.  A dedicated program for this might be best.

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #4 on: June 03, 2007, 08:44 PM »
@hirudin :
- Very good idea to use KeePass.
- Just installed it and the autocomplete feature is flexible enough to allow many different uses. It does pretty much what I want (well, allmost!) : providing a list of templates depending on the type of document I want to save.
- "Retyping" over the already "written" fields is not terribly sexy, but it's not a big problem. I guess that would be an aspect that could eventually be improved in a dedicated app.

The AHK suggestion -- I tried something similar a couple months ago -- would be a bit more complex to achieve... Well, for me, shall I add. That's why I really like your KeePass solution. But for a coder, AHK might just be the way to go...

@justice :
Yes, a good idea for a coding snack. Although KeePass works pretty well already, even if not it's not quite perfect...

@mouser :

i think a good solution to this would be not to focus on the save dialog, but instead think about a generic tool that can pop up with a hotkey and let you fill out a little form with checkboxes or fields, whatever, and then create some text matching a template you design, and copy it to clipboard or paste it in your active program.  then you could use it for save dialog or when renaming, or whatever.

You could use my "Form Letter Machine" program for something like this, though i hardly think it's ideal.  A dedicated program for this might be best.


YES... I understand a bit better what you meant in the my other "related" thread...

I totally agree with you. It should be one solution that doesn't focus on the "save as" dialog.

Actually, what I've started to do (in my explorations) is creating different entries in KeePass that appear when I use the pre-configured "ctr+alt+a" hotkey:
  • some are for file name templates (the templates will only appear when a "save as" dialog is open)
  • some are for tags and only appear when I use specific applications, etc.

It works pretty well. But I can forsee problems:

  • "mass editing" entries (like "mass editing" the KeePass's note field) would be a bit cumbersome if not really ennoying.
  • having 100s of different tags might be hard to manage (to say the least) with the little "Auto-Type Entry Selection" window.

I'll see if I still like it in a few days.
If not, I’ll look at your “Form Letter Machine” :)

In the long term, I guess some specific AHK script would probably be more adapted anyways.

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #5 on: June 04, 2007, 01:19 AM »
Still playing with KeePass. I like the interface, many useful shortcut keys...
- But sorting the "tags" in the "auto-type entry selection" window can be quite a challenge... it's also not that easy to rapidly reach the tag you want without using the mouse. Still trying to figure out the best way.

One question :
Do some of you use "textual" tagging systems, or automated file naming, etc.?
And, if you do, what do you use or how do you do it?

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,199
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #6 on: June 04, 2007, 08:47 AM »
(in my example "CB-TH-" means "complete book" and "Thesis"; "Amado, Carlos Augusto Agon" is of course the author; 1998 is the date; and "Open Music" is the title.)

For a sensible scheme for abbreviations, take a look at Jon Knowles' ABCZ typing abbreviation system.  Some text expansion programs have macros for dates etc., which can sometimes be useful, and you could use more than one abbreviation at a time.  AutoHotkey is a good system for this; others include PhraseExpress and Type Pilot.  This could be what you need.  Also, of course, the might PowerPro has snippets, and I'm sure it could be coaxed to do similar.




Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #7 on: June 04, 2007, 06:32 PM »
Thanks rjbull.

Yes, the abcz abbreviation system is convenient... and thanks for the link -- nice summary. (I must say that I avoid using abbreviations for references -- hence my long file names -- as it can become quite complicated when there are thousands of them).

For my abbreviation system (mainly used for tagging, project and category names, etc.) I didn't use the abcz TAS for different reasons. The main one being that I wanted an even more simple system that would generate words which could never be confused with French words -- my main language.

I'm not sure PhraseExpress or Type Pilot or other "typing aids" would really help me. But I'll have a close look at these, next weekend. Thanks for mentioning them.

I actually find that something like KeePass with its ability to suggest different entries or templates depending on the context (the "save as" dialog brings up certain template suggestions, an MS Word document brings other suggestions, etc.), icons to help differentiating groups of tags, is quite good. But what's missing is the ability to use hotkeys or different shortcuts to quickly paste the text, and many other features you find in "clipboard enhancer" type of apps (like ClipMate, Clipboard Help + spell, etc.).

I've read that you use "ArsClip and CHS in tandem". May I ask what features you especially like in these?

Thanks!

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,199
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #8 on: June 10, 2007, 04:12 PM »
Armando,

Sorry to be so long in replying, and apologies for the length.

I must say that I avoid using abbreviations for references

I admit I sometimes do.  Of course, the system isn't intended for that, but as triggers for expansion.

I wanted an even more simple system that would generate words which could never be confused with French words -- my main language.

The DOS word processor PC-Write had a suggestion that, in English, the letter "q" is fairly rare.  So they suggested using it to end abbreviations with, e.g. "ltq=lieutenant."  I don't know how that works in French, but you might be able to adapt the idea.

I actually find that something like KeePass with its ability to suggest different entries or templates depending on the context (the "save as" dialog brings up certain template suggestions, an MS Word document brings other suggestions, etc.), icons to help differentiating groups of tags, is quite good. But what's missing is the ability to use hotkeys or different shortcuts to quickly paste the text, and many other features you find in "clipboard enhancer" type of apps (like ClipMate, Clipboard Help + spell, etc.).

Your use of KeePass is more advanced than mine, and was a clever idea  :)  You might go over to their forums, and put in a feature request for the hotkeys.

I've read that you use "ArsClip and CHS in tandem". May I ask what features you especially like in these?

Partly it's because I like software, and because I use the clipboard quite a lot and didn't want to lose anything, used two at a time.  However, until about a couple of weeks ago I had a more powerful reason.  The computer I was using then was quite old, and CHS was very slow at popping up.  This is something I've noticed about Mouser's other applications, perhaps a Delphi defect.  ArsClip was very fast at popping up.  I've now had to move to a much newer computer where ArsClip is instant, but though CHS is much better, it's still noticeably sluggish by comparison (FARR is much improved).  For what it's worth, here's my list of comments on the two, mainly based on the old computer.  They're both free, no-install, can refresh the clipboard chain, have permanent clips, can be set to ignore clips coming from certain programs e.g. KeePass, and the basic actions are easy to use.  Please note I have less experience with ArsClip.  In both cases, clipboard refresh often doesn't work on Win98.

CHS
Good points:
  • :up:  Extremely reliable.  Seems to catch all (text) clips you throw at it, however fast, and almost never crashes.  That's why I tend to keep it loaded, even if I use something else as well.
  • Very good features for deleting old notes - moves New to Old, Old to Trash, delete from trash, all on user-definable schedules.
  • Extra features like spell check and user-definable tools (but see below)
Not-so-good points
  • :down: Very sluggish at popping up   :(
  • Title list pane doesn't look quite Windows standard
  • If you go into Trash and try marking the first item, then go to the last one and press Shift-Click to mark them all, then Delete, it doesn't seem to do it.  It may delete some, and leave the rest, and you have to repeat the process.  But, you can go into Configuration and get an instant delete of everything.
  • In the spell-checker window, the formatting is sometimes screwed up.  I think this is to do with whether the text was nicely word-wrapped before you clipped it.  Going into user-tools seems to wrap it properly, but it shouldn't be necessary.
  • I couldn't get the user-definable external tools to work, but it might have been owing to permissions set on my computer.

ArsClip
Good points:
  • :up: Very fast at popping up.  This is the reason I stick with it.
  • Small program (by comparison with CHS), so better for putting on a USB stick.  Because it's small, it's the one I tend to use on my Win98 laptop at home, on the assumption that it takes less resources.  Not sure I'm on solid ground here...
  • Can clip graphics as well as text.  I have not tried this.  It's not the default, you have to enter Configuration and set it.
  • Some other features I haven't tried: configuration options suggest it can keep and paste RichText, for example.  Also has an option to paste as plain text.
Questionable points
  • Look and feel of the program, especially the configuration, differs a bit from ClipCache, CHS, Clipmagic, CLCL.  It works perfectly well, though.
  • It's detection of a break in the clipboard chain is too sensitive.  Several times now it has reported that it thinks the clipboard chain has been broken by... ArsClip!   :P
  • It has several pasting methods.  You need these, as sometimes the usual one doesn't work.  I don't understand this, as most other clipboard enhancers only need one.
  • The author has done himself a disservice by saying on his Web site that it holds 15 clips.  That's only the default pop-up list.  When they scroll off the pop-up, they are stored in separate individual files, with a user-definable number of files available.
  • McAfee virus scanner often complained that ArsClip disk files were obfuscated HTML, and deleted them.  Not really ArsClip's fault, but annoying.

Finally, about catching clips thrown at programs fast.  I still use DOS programs, and when I want to send their contents to the clipboard, use Horst Schaeffer's 32-bit command-line program ClipText.  When several files are involved, I tend to use this from the command line:

for %a in (*.txt) do cliptext from %a

Usually there are four plain text files, and you can see why a clipboard enhancer is necessary, when you want to paste four different files into four different emails.  My files are generally fairly small; 55K would be about the maximum.  That means that new clips are being sent to the clipboard very rapidly.  I haven't tried this on the new computer yet.  On the old one, I found some clipboard enhancers, in some cases, wouldn't see all the files.  I think they usually picked up the first and last, but ignored the middle two (maybe a faulty memory here).  CHS always picked up everything.   So did the old freeware version of ClipCache.  But ClipMagic didn't, and ArsClip didn't always, either.  Clipmagic does have a feature I would dearly love to see the others emulate, the ability to save the URL a clip came from along with the clip.

HTH...





Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #9 on: June 10, 2007, 05:59 PM »
Wow. Thanks for that very complete answer rjbull.

You know what? I'm actually reconsidering <b>abcz</b>. I am in a restructuring phase (see all my other posts or threads on file naming, etc.). So, I'll see... Maybe abcz with the right prefixes might solve some of my recurring problems. But is it worth the trouble? I'll have to think about that... So many files to change or to go through... Computers computers.

About KeePass : I used it a couple days, liked it (might be using it for passwords instead of using my old AXCryptencrypted file to sort all of them...) but I've decided to give AHK another go (in some ways, it's not as sexy -- KeePass' interface is quite nice -- but extremely efficient). So that's what I'm using now and it's working pretty well to automate simple tag or filename writing-inserting (ex. : I'll write ch- and, inspired by hirudin's suggestion, it will insert a template for chapters names : "CH-Nom, Prén_ Dte_ Titr Liv_ ChNo_ Titre chap_ TAG" ; or I'll write "cthée" and ahk will write : "tgsCthée" -- very good to accelerate tag writing, to avoid typing mistakes  and especially to avoid creating similar but different (and useless) tags for the same subject when others already exist... : I’ll know it’s not the right tag if AHK doesn’t autocomplete! And if I need another tag, I'll just add it to the script. Convenient, but maybe a bit archaic.).

The only problem I have with my current usage of AHK is that I need to open my script from time to time to remember what my tags are... Right now, it's not a big issue because my script is not that big, but... it could grow substantially with time. If only I could script something to have a popup menu like the one from CHS to see all my tags categorized, etc. etc. (see my posts and my suggestions for a "tagging helper" in a thread in the CHS section). https://www.donation...05.msg62219#msg62219

about ArsClip : interesting comparison. Thanks for taking the time to do that! I’ve not yet decided which clipboard enhancer I’m going to stick with. CHS works well on my computer and, yes, seems extremely reliable. There are certain things I wish where easier to do, like the sorting of the clips : I was never able to have the clips appear in the order I want in the popup menu (ctrl+alt+q). I might ask mouser if he'd consider adding that feature.


Anyway... I’ll give more feedback as I sort things out... If anyone's interested.
My tagging problem is certainly not entirely resolved!


Thanks again for your input!


PS :And If you feel like giving your opinion on file naming (and your own personal habit concerning file naming), please have a look at this thread! https://www.donation...dex.php?topic=8820.0
:)


[edit : wrong hyperlink]
« Last Edit: June 10, 2007, 06:08 PM by Armando »

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,199
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #10 on: June 16, 2007, 03:37 PM »
The only problem I have with my current usage of AHK is that I need to open my script from time to time to remember what my tags are... Right now, it's not a big issue because my script is not that big, but... it could grow substantially with time. If only I could script something to have a popup menu like the one from CHS to see all my tags categorized, etc. etc.

Assuming you don't compile your AHK scripts, then they're interpreted, and exist as plain text files.  What I do is make a script where the first line is

^!r::Reload  ; Assign Ctrl-Alt-R as a hotkey to restart the script

i.e., press Ctrl-Alt-R reloads the current script.  I also put this at the end of my file

::exitahk::
ExitApp

So I can type "exitahk" and the script exits.  In between are all my ABCZ TABS,

::acqd::acquired
::acqe::acquire
::acqn::acquisition
::acqns::acquisitions

etc.

When I'm using it, I load the AHK file in the normal way, but I also open the same AHK file in my editor.  I can use the editor to look through my definitions and change them or add new ones.  Whenever I do either, I just have to save the file to disk and press Ctrl-Alt-R.  The AHK icon flickers, and the modified file is loaded, ready to go.

You might also want to check out a file called SLAVE_3.03.exe, which someone on DC mentioned before.  It's in the AHK forums, but I don't have the reference conveniently to hand.  It's as close as anyone has yet come to a GUI front end for AHK, and includes hotstrings.

PS :And If you feel like giving your opinion on file naming (and your own personal habit concerning file naming)

Looks like you've read other DC posts on this topic, as you mention BRU.  You may be aware that the formidable zridling set out to make a group review of renaming tools, but gave up because they all had such radically different interfaces.  I've dabbled a little with both 1-4A and with Lupas, but now use the excellent multi-rename tool built into my file manager, Total Commander (TC).  It does far more than I need at present.


Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #11 on: June 17, 2007, 12:08 PM »
Thanks for sharing your techniques!

Assuming you don't compile your AHK scripts, then they're interpreted, and exist as plain text files.

Yes, that's exactly what I do too. I also use a line to edit my script on the fly:

^+!e::Edit

Here are some general tags I use, entered in AutoHotkey. they are all identified with "normal" words to make my "human reading" easier... :

; Organisation
:oc:corgn::tgsCorgn

; Philosophie
:oc:cphie::tgsCphie

; Physique
:oc:cphye::tgsCphye

; Psychologie
:oc:cpsye::tgsCpsye

(Like I said earlier, my usage of AutoHotkey here is mostly 1- to add accuracy to my spelling when I insert tags -- it accelerates a bit the inserting of the tags, but not that much, 2- to always have and updated list of all the tags I use. I use these tags in conjunction with EverNote (using keyword filtering), X1 and Copernic, to name a few.)


Thanks for the SLAVE_3.03.exe idea: I'll check that out.


I've dabbled a little with both 1-4A and with Lupas, but now use the excellent multi-rename tool built into my file manager, Total Commander (TC).  It does far more than I need at present.

I haven't tried these yet... but I played quite a bit with Flexible Renamer and Rename Master before "settling" on Bulk Rename Utility. Trying XYplorer and TC (even if they are completely different beasts altogether) is on my todo list.

I'm also still trying to find out about the different ways to tag files (the file itself and/or its content) : tried four or five different softwares, but coming back to inserting the tags directly in the file names, as I always did. It seems like the only way that's fully portable and durable. If the tagging (and the file naming) is very systematic and rigorously "coded", then utilities like BRU and PowerGrep (I've only tried the latest once) can be used to make changes to tags in multiple files all at once.

Anyway... I'll try to summarize my whole strategy when it's a bit more stable.

pugwash

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #12 on: July 01, 2007, 04:46 AM »
Hi,

http://www.freewarehits.de/

Remote Keys is a small footprint "spreadsheet" that you can put text (or easily build macros) into cells.  Click on your appropriately-named cell and the content is entered where your cursor is.

I have used it extensively for documents etc where I need the same wording.

It is freeware.

Cheers, Nigel

SleepingWolf

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 118
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Semi-Automated file naming
« Reply #13 on: November 21, 2008, 07:22 PM »
Would drag'n'drop robot be useful as a gui for a DOS(like) rename command, Armando
-------------------------------------------

Question everything, use a fact-checker.
Respect yourself and respect others.
Peace out!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Semi-Automated file naming
« Reply #14 on: November 21, 2008, 10:07 PM »
Thanks SleepingWolf. Actually, since the time I first started this thread (a year and half ago...), I found ways to use AHK and other software (like Renamer, X1, InfoQube (AKA SQLNotes), FARR... ) in very speedy and efficient ways. There's another thread explaining how I do things (still do it the same way today).

[WARNING to other posters : this thread is reeeeaaally old]