Question regarding moving files to subdirs

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Hakker
Junior Member
Junior Member
Posts: 23
Joined: 2009-03-01, 14:48 UTC

Question regarding moving files to subdirs

Post by *Hakker »

I'm seeking a solution to a problem I have.
I get files in one dir long live downloading. however I wish to move them to subdir based on part of their name but I have no idea how I would automate it a bit more.

the filenames are basically

Code: Select all

[folder]
-- blabla more stuff [whats this] (more stuff) more name (abcdef) [fixed] etc.extension
-- blabla more stuff [whats this] (more stuff) more name (ghijkl) [fixed] etc.extension
basically the subdir need to be whats in (abcdef) or (ghijkl) and the [fixed] part is the most in common part which could help me with searching since more special chars are used. resulting in:

Code: Select all

[folder]
-[abcdef]
-- blabla more stuff [whats this] (more stuff) more name (abcdef) [fixed] etc.extension
-[ghijkl]
-- blabla more stuff [whats this] (more stuff) more name (ghijkl) [fixed] etc.extension
I have no clue if TC can actually do this or if I need to find a batch script that can do something like that or if there is a tool.
User avatar
nsp
Power Member
Power Member
Posts: 1952
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Question regarding moving files to subdirs

Post by *nsp »

Hakker wrote:I'm seeking a solution to a problem I have.
I get files in one dir long live downloading. however I wish to move them to subdir based on part of their name but I have no idea how I would automate it a bit more.

the filenames are basically

Code: Select all

[folder]
-- blabla more stuff [whats this] (more stuff) more name (abcdef) [fixed] etc.extension
-- blabla more stuff [whats this] (more stuff) more name (ghijkl) [fixed] etc.extension
basically the subdir need to be whats in (abcdef) or (ghijkl) and the [fixed] part is the most in common part which could help me with searching since more special chars are used. resulting in:

Code: Select all

[folder]
-[abcdef]
-- blabla more stuff [whats this] (more stuff) more name (abcdef) [fixed] etc.extension
-[ghijkl]
-- blabla more stuff [whats this] (more stuff) more name (ghijkl) [fixed] etc.extension
I have no clue if TC can actually do this or if I need to find a batch script that can do something like that or if there is a tool.
If you only care of what is enclosed into the second parenthesis place, you can use MRT.

Code: Select all

Search for:.*\((.*)\).*\((.*)\).*
replace with:$2\\$0
use the options: [E], RegEx and Subst
User avatar
petermad
Power Member
Power Member
Posts: 16138
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2Hakker

If you don't know it - nsp is writing about using the Multi-rename Tool (Ctrl+M)
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply