topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Sunday December 15, 2024, 4:23 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: Move files to folders named after part of filename  (Read 8993 times)

dcwul62

  • Supporting Member
  • Joined in 2013
  • **
  • default avatar
  • Posts: 336
    • View Profile
    • Donate to Member
Move files to folders named after part of filename
« on: November 25, 2014, 04:34 AM »

Hi Folks,

I need to move a lot (i mean a LOT) of files that all look like these:

Some FileName 1888-0010 31121888.pdf
Some FileName 1888-0009 31121888.pdf
Some FileName 1888-0008 31121888.pdf
Some FileName 1888-0007 31121888.pdf
Some FileName 1888-0006 31121888.pdf
Some FileName 1888-0005 31121888.pdf
Some FileName 1888-0004 31121888.pdf
Some FileName 1974-0360 31121974.pdf
Some FileName 1974-0361 31121974.pdf
Some FileName 1975-0001 31121975.pdf
Some FileName 1975-0002 31121975.pdf
Some FileName 1975-0003 31121975.pdf

to subfolders named after the first 3 words, like these


Some FileName 1888
Some FileName 1974
Some FileName 1975

Any suggestions??

thanks
-

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Re: Move files to folders named after part of filename
« Reply #1 on: November 25, 2014, 05:34 AM »
(just for the record) something comparable was requested lately:

Hello. Would it be possible to add a feature to find common text between files and use that as an name for the folder?
eg we have  files
[Chemistry] Workbook 01.rar
[Chemistry] Workbook 02.rar
[Chemistry] Workbook 03.rar
So the new folder is named [Chemistry] Workbook.

This is doable.  However, in your example, technically, the common text would be "[Chemistry] Workbook 0" right?
Tom

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: Move files to folders named after part of filename
« Reply #2 on: November 25, 2014, 06:08 AM »
Um, you have DOpus why don't you just rename them into the folders?

2014-11-25 23_07_57.png

dcwul62

  • Supporting Member
  • Joined in 2013
  • **
  • default avatar
  • Posts: 336
    • View Profile
    • Donate to Member
Re: Move files to folders named after part of filename
« Reply #3 on: November 25, 2014, 07:09 AM »
Wonderful!!

I have been puzzling about this whole morning!
Really, I could not figure this out.

Thank you so much. This way is soo much easier indeed.

After trying this that and I don't what (even went as far as to download the drag and drop utility from this site, but left that, cud not figure out how it works)
I just now figured out a context menu item like this Rename REGEXP PATTERN "(.+\d{4})-(\d{4})(\s)(\d{8})\.(.+)" TO \1\\\0
which is much more complicated.


Regretfully the setfoldate would not work here.

Some FileName 1888-0010 31121888.pdf
Some FileName 1888-0009 31121888.pdf
Some FileName 1888-0008 31121888.pdf

results in folder
Some filename   (without year)

So I had to try and figure out something else.

Thanks
-


4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: Move files to folders named after part of filename
« Reply #4 on: November 25, 2014, 10:57 AM »
I just now figured out a context menu item like this Rename REGEXP PATTERN "(.+\d{4})-(\d{4})(\s)(\d{8})\.(.+)" TO \1\\\0
which is much more complicated.

Why did you make it so complicated?

Regretfully the setfoldate would not work here.

Why would it, they're files not folders.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: Move files to folders named after part of filename
« Reply #5 on: November 25, 2014, 02:40 PM »
I made a quick app called Folder by Filename - See if it would work for what you are asking.

It took this - http://f.cl.ly/items...112514_033551_PM.jpg
and made this - http://f.cl.ly/items...112514_033652_PM.jpg


If that looks like what you are asking for let me know and I'll shine it up so you can use it.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Move files to folders named after part of filename
« Reply #6 on: November 29, 2014, 12:27 AM »
I need to move a lot (i mean a LOT) of files that all look like these:
[...]
Any suggestions??

My File Punter app was made for stuff like this.

dcwul62

  • Supporting Member
  • Joined in 2013
  • **
  • default avatar
  • Posts: 336
    • View Profile
    • Donate to Member
Re: Move files to folders named after part of filename
« Reply #7 on: January 14, 2016, 07:22 AM »
@4wd
ref pm
attached files
=

=

DonL

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 171
    • View Profile
    • XYplorer File Manager
    • Donate to Member
Re: Move files to folders named after part of filename
« Reply #8 on: January 14, 2016, 07:45 AM »
The latest XYplorer (16.10) has something brand-new to offer along these lines: Batch Move

http://www.xyplorer...._16.10.php#BatchMove

Can move heaps of files to new folders by much more properties than just parts of the filename.

Just saying. :)

dcwul62

  • Supporting Member
  • Joined in 2013
  • **
  • default avatar
  • Posts: 336
    • View Profile
    • Donate to Member
Re: Move files to folders named after part of filename
« Reply #9 on: January 16, 2016, 07:36 AM »
These are some filenames-01-07012016 064756.png
These are some filenames-02-07012016 064901.png
These are some filenames-03-07012016 064916.png
to be moved to a folder named: These are some filenames


These are some filenames 1999-01-07012016 064756.png
These are some filenames 1999-02-07012016 064901.png
These are some filenames 1999-03-07012016 064916.png
These are some filenames 1999-04-07012016 064921.png
to be moved to a folder named: These are some filenames 1999


Yet some other filenames with year 2013-07012016 064756.png
Yet some other filenames with year 2013-07012016 064901.png
Yet some other filenames with year 2013-07012016 064916.png
to be moved to a folder named: Yet some other filenames with year 2013


Yet some other filenames without year-07012016 064756.png
Yet some other filenames without year-07012016 064901.png
Yet some other filenames without year-07012016 064916.png
Yet some other filenames without year-07012016 064921.png
To be moved to a folder named: Yet some other filenames without year

--> This be covered by 1 regex.

I did look at FilePunter but I am afraid it is pretty complex.

XYplorer: I have Opus, thanks for the tip.
Frankly I don't want to use another file explorer.