Moving Files Into Folders Based on Part of Filename

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
runner3734
Junior Member
Junior Member
Posts: 2
Joined: 2006-07-12, 14:26 UTC

Moving Files Into Folders Based on Part of Filename

Post by *runner3734 »

Can this be done?

In other words, if I have a large number of files, with filenames like:

EK043-14 - Syreeta - Your Kiss Is Sweet.zip
EK043-15 - Kiki Dee - Amoureuse.zip
EK043-16 - Straycats - Runaway Boy.zip
EZH37-10 - Rice, Damien - Cannonball.zip
HSPAK2-03-09 - Humperdinck, Engelbert - Quando, Quando, Quando.zip
LG004-01 - Carpenters - Close To You.zip
LG004-02 - Carpenters - Yesterday Once More.zip
LG004-03 - Carpenters - Please MR Postman.zip

And, I would like to sort the files into folders, based on the part of the filename before the first "-". So, for the above files, the folders "EK043", "EZH37", "HSPAK2", and "LG004" would be created (if they didn't already exist), and then the files would be moved into the appropriate folder.

I am new to TC, so perhaps I am missing something, but it looks like the move function doesn't support regular expressions, and it looks like the multi-file rename function doesn't support directory creation...

If TC can't do this, then does anyone know of a product that can?

Oh, and there was one other *very* simple (but unrelated) thing I couldn't figure out how to do in TC - export a filelist to text....

Well, thanks if anyone can suggest a solution. Although there are a lot of apps out there for generating directory lists, I know of only one app, Magic File Renamer, that can sort files into folders based on filename.
User avatar
szlori
Senior Member
Senior Member
Posts: 263
Joined: 2005-01-17, 07:12 UTC
Location: Sydney

Post by *szlori »

Hi, welcome aboard!
No, I don't think you can achieve something like this directly with TC.
However, it might be possible with the help of some scripts.
I'm sure the "script-gurus" will jump to help you. :wink:
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2runner3734

Welcome too!
Oh, and there was one other *very* simple (but unrelated) thing I couldn't figure out how to do in TC - export a filelist to text....
For that you can use the commands 'cm_CopyNamesToClip' (copy filenames only) and 'cm_CopyFullNamesToClip' (copy filenemes with path).

To use these commands you have to add a toolbar button or a starter menu entry for them. Please see helpfile on how to do that or ask here if you got further questions.
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

StickyNomad
To use these commands you have to add a toolbar button or a starter menu entry for them. Please see helpfile on how to do that or ask here if you got further questions.
:shock: Can't believe I'm reading THAT. You must have told him to bind hotkeys for those commands via configuration->misc dialog.
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
runner3734
Junior Member
Junior Member
Posts: 2
Joined: 2006-07-12, 14:26 UTC

Post by *runner3734 »

[quote="StickyNomad"]
For that you can use the commands 'cm_CopyNamesToClip' (copy filenames only) and 'cm_CopyFullNamesToClip' (copy filenemes with path).
[/quote]

Thanks. Yes. I see how to do that. I also see an awful lot of other commands there which I have no idea what they do!

Where is the documentation for all of these "internal" commands? In my cursory look at the help file, I just didn't see it. I found the part about setting up the hotkeys for them, but no detailed descriptions about what the commands actually do.

And, oh yeah, I'd like to learn more about the scripting with TC...where should I begin?
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

In the Tutorial…

Post by *Clo »

2runner3734

:) Hello !

• The internal commands descriptions are not indeed in the official Help file.
- However, you can get them in our free Tutorial, please use the link in my signature to get it ;)

:mrgreen: KInd regards,
Claude
Clo
Last edited by Clo on 2006-07-12, 22:35 UTC, edited 1 time in total.
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

runner3734
1. Please, enable BBCode in your profile.
2. Open the wiki & search it for:
a) A tutorial made by Clo; it contains explanations to some (or all - haven't seen it) of internal commands
b) Autohotkey & Powerpro pages will guide you through scripting.

Instead (or to complement to) of a) you can download Ultra TC Editors. It has nice data files, helping to edit whatever you want in TC.

<edit>
Ah, Clo. You are thought to be slower due to your years :D Good to be mistaken. :wink:
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Next update as soon as…

Post by *Clo »

2XPEHOPE3KA

:) Thanks to quote the Tutorial!

- Currently, the most internal commands are described; but since we have the tests for 7.0 running still, we can't update it completely…
- We'll do when at least the first public 7.0 ß1 shall be released, as a tentative version including the most new features and new polished-up commands and short cuts (I mean : Which have been tested quite successfully !)

:mrgreen: KR
Claude
Clo

Note : I've three fora to read and reply at the same time, plus some other (home) works, and I'm not the Shiva godess, I've two arms only ! :lol:
Last edited by Clo on 2006-07-12, 22:51 UTC, edited 1 time in total.
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2XPEHOPE3KA
Can't believe I'm reading THAT. You must have told him to bind hotkeys for those commands via configuration->misc dialog.
Ehrm, well... öh, OK. Should have mentioned that option, too for sure. I simply assumed it was ment for ehrm.. occasional use only :wink:
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

OT

Post by *XPEHOPE3KA »

Clo
I've three fora to read and reply at the same time, plus some other (home) works
I have 5 :cool:
Post Reply