topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 5:49 pm
  • 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

Last post Author Topic: DONE: Organize files into folders based on flename wildcard parsing  (Read 96819 times)

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 178
    • View Profile
    • Donate to Member
Hi Jody, a clue to the paths issue, which makes me think it is something to do with the field where we enter the Destination path. The fact that the source path can be entered in the required format lends to a belief something odd is going on.

I can create the path directly in the settings file, which loads OK and functions correctly

\\NSA-4\++++START   (.*?) - (.*?)x(.*?)   \\NSA-4\++++FINISH\??1 [s0??2]   No   Yes


There is one issue with doing this in the saved settings file and that is the entries are a continuous line. Could they be made into one per line this would simplify manual edits to overcome the path issue.

EDIT
Ok there is a second issue, and that seems to be related to the line length.
Why an I Magician62? Because Magician1 thru 61 were gone. :)
« Last Edit: April 09, 2014, 01:13 PM by magician62 »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Hi Jody, a clue to the paths issue

Please read this post.  It's an AutoHotkey bug.

https://www.donation....msg342772#msg342772

kiui

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Hello,
I'm a basic (french) user and trying to work with File Punter... but it doesn't acually.

I've in the same folder such pdf files.

abcdef_ducs_PES_04-2014.pdf
dfglfg_ducs_PES_04-2014.pdf
kiui_ducs_PES_04-2014.pdf
...
the only variable is the first letters (max 6 numbers)

and would like to move thoses files to folders :
abcdef
dfglfg
kiui

It's the right application to use to do this ?
Many thanks for your help.
Julien

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Hi, Julien, and welcome to the DonationCoder site.   :D

and would like to move thoses files to folders :
abcdef
dfglfg
kiui

It's the right application to use to do this ?

Yes, you can use File Punter to move those files how you want.  Have you tried to create a RegEx rule?  If so, can you post a screenshot of it?

kiui

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Hello,
Here is the rule :
C:\Users\Administrateur\Desktop\test   (.*?)_ducs_PES_04-2014.pdf   C:\Users\Administrateur\Desktop\clients\??1   No   No   

Thanks

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
C:\Users\Administrateur\Desktop\test   (.*?)_ducs_PES_04-2014.pdf   C:\Users\Administrateur\Desktop\clients\??1   No   No   

Based on that, it looks like you have not set that rule as a RegEx rule.  Double-click the rule and enable the "Pattern is a regular expression" checkbox.  Test it again and let me know if that makes it work how you want.

kiui

  • Participant
  • Joined in 2014
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Fantastic ! It works...
Sorry but I didn't get the différence is this box enable or not ?

the second part of my files name is changing, but the rule is the same:
 (.*?)_ducs_PES_04-2014.pdf
 (.*?)_ducs_AEPT_2014.pdf

can i put someting to not have to create a rule for each file "suffix" name.?

And if I can ask one more thing, what's the difference between (.*?) and (\d+) or (.+?) ?

thanks!

(You will never know how much time I will earn in the future with this application, but now i'm loosing a lot to learn  :P )


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Fantastic ! It works...

Great to hear.   :Thmbsup:

Sorry but I didn't get the différence is this box enable or not ?

File Punter can use normal DOS-style wildcards or it can use regular expressions.  The problem is that both methods make use of such characters as * or ? but in different ways.  Hence, the checkbox to set which method to use.

can i put someting to not have to create a rule for each file "suffix" name.?

You sure can.  Try this as your match rule:  

(.*?)_.*

And if I can ask one more thing, what's the difference between (.*?) and (\d+) or (.+?) ?

Hehehe...the world of regular expresssions.   ;)  There is so much to learn that it might be easier to point you to http://www.regular-expressions.info/tutorial.html

(You will never know how much time I will earn in the future with this application, but now i'm loosing a lot to learn  :P )

I'm glad you find the program useful.  It's a very powerful program that can, potentially, really mess things up so please make good use of the "test mode" functionality it offers.
« Last Edit: May 13, 2014, 02:41 PM by skwire, Reason: Grammar edit. »

bastik

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 14
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #58 on: December 16, 2014, 08:37 AM »
@skwire

File Punter is useful, good thing it does not overwrite existing files. Now I'd like to ask if something is already possible or if that turns out to be a feature request.

Explanation of what I am doing:
I have files whose names include $x and $y that are supposed to be part of a folder structure. They are moved or copied from
C:\source
to
D:\destination_path\$x, $y\some_subfolder

A regular expression (don't know too much about them) looks for $x and $y, brackets like the following () group $x and $y. The destination in File Punter looks like this
D:\destination_path\??1 ??2\some_subfolder
File Punter does what I want it to do, in the first place. It moves a file named
creative mind 12345.ext
to
D:\destination_path\creative mind\some_subfolder\creative mind 12345.ext
That works, that is cool.

What I would like and why I would like it:
The folders are supposed to exist already. Meaning they are present before the copying or moving process even begins. It is cool that File Punter is able to create folders that are not present, however in my scenario there was something wrong if the folder did not exist and had to be created by File Punter. Like the folder present is
creative mind
but the files say
craetive mind $number
File Punter does its job and creates a folder, which is not its fault, but my misfortune.

Is there a way, for example by modifying my destination
D:\destination_path\??1 ??2\some_subfolder
to achieve that File Punter ignores the files. So that if folders with
??1 ??2
are not present are not created?

If that is not possible, I'd like to suggest two new methods
copy to existing folders
and
move to existing folders
Alternatively some other way of telling file punter to not create folders.


Other stuff I wondered while I was writing this:
When I move the files (my use case), remaining files indicate that something went wrong. E.g. the pattern did not catch all files or the destination file is already present. I don't have that "feedback" when I would copy the files. Could there be some kind of log, either where every operation goes into, or one just listing the skipped files, maybe with a reason?

I'm aware that File Punter is not a (re)naming tool, but I realized that I move
creative mind 12345.ext
to
.../creative mind/subfolder/creative mind 12345.ext
which makes it a bit redundant. Is there a way to use File Punter to strip
??1 ??2
from the files during the process?

Thank you for the program and thank you for anything you can say about my problems.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #59 on: December 17, 2014, 01:28 PM »
@bastik: I've quickly read through the post but I need to devote some time to studying it a bit.  I've got a few other app requests to fulfill first but, rest assured, this is on my agenda.

bastik

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 14
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #60 on: February 13, 2015, 11:55 AM »
@skwire

It is nothing I have a strong need for.

So if it is very easy to achieve it would be nice if it could be added. If it is most likely difficult to do, then please don't implement it unless there is another request or you find it extremely useful.

Is there a way to use File Punter to strip (blabla) from the files during the process?
This is totally irrelevant. Having the identifier in the filename makes sure they will be found. This is a non-issue.

callumm

  • Participant
  • Joined in 2015
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #61 on: November 09, 2015, 02:40 PM »
Will filepunter punt folders?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #62 on: November 09, 2015, 04:02 PM »
Will filepunter punt folders?

Nope.

dariotoby

  • Participant
  • Joined in 2018
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #63 on: October 21, 2018, 11:23 AM »
hi, I recently discovered this program that I think is for me,
File Punter
But I have to ask for help because I do not know anything about strings regx
I'll explain my situation and if someone can suggest the string to insert
I of the mp3 files named example so
Aretha Franklin - Right woman do right man (Cori) (K5) .mp3
Ariana Grande & John Legend - Beauty and the beast (Cori) (K5) - by Maker.mp3

Type in these ways are karaoke files and I have many
I have these files put all in a folder like Download
Then I have already organized files in folders named for Artist in another PC folder
I would like you to move them to existing folders that have the artist's name in another PC folder.
Someone can help me on how to configure the program I read all the theard I try strings but they do not work.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #64 on: October 21, 2018, 11:52 AM »
Hi, dariotoby, and welcome to the DonationCoder site.   :)

Type in these ways are karaoke files and I have many
I have these files put all in a folder like Download
Then I have already organized files in folders named for Artist in another PC folder
I would like you to move them to existing folders that have the artist's name in another PC folder.
Someone can help me on how to configure the program I read all the theard I try strings but they do not work.

I did create a program to move audio files according to their tags called Tags 2 Folders but File Punter might be better suited to your case.  One question -- in your filenames, is the artist ALWAYS before the first dash in the file name?  For example:

Aretha Franklin - Right woman do right man (Cori) (K5) .mp3
Ariana Grande & John Legend - Beauty and the beast (Cori) (K5) - by Maker.mp3

dariotoby

  • Participant
  • Joined in 2018
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #65 on: October 21, 2018, 12:23 PM »
Yes is the artist ALWAYS before the first dash in the file name

 
Hi, dariotoby, and welcome to the DonationCoder site.   :)

Type in these ways are karaoke files and I have many
I have these files put all in a folder like Download
Then I have already organized files in folders named for Artist in another PC folder
I would like you to move them to existing folders that have the artist's name in another PC folder.
Someone can help me on how to configure the program I read all the theard I try strings but they do not work.

I did create a program to move audio files according to their tags called Tags 2 Folders but File Punter might be better suited to your case.  One question -- in your filenames, is the artist ALWAYS before the first dash in the file name?  For example:

Aretha Franklin - Right woman do right man (Cori) (K5) .mp3
Ariana Grande & John Legend - Beauty and the beast (Cori) (K5) - by Maker.mp3

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #66 on: October 21, 2018, 01:16 PM »
You could do something like this:

2018-10-21_130846.png

In case it's not clear, the pattern is: (.*?) -

Or course, you will need to adjust the paths according to your file system (leave the ??1 at the end of your destination path).  After creating an entry like above, click the "Run simulation" button to see if the entry will match and move how you expect.  For instance, in my test setup for you, here's my simulation report (I coloured some bits to show you how it matches everything before the first dash and then creates a folder from that data):

C:\download\music\Aretha Franklin - Right woman do right man (Cori) (K5).mp3 --> c:\music\artists\Aretha Franklin\Aretha Franklin - Right woman do right man (Cori) (K5).mp3
C:\download\music\Ariana Grande & John Legend - Beauty and the beast (Cori) (K5) - by Maker.mp3 --> c:\music\artists\Ariana Grande & John Legend\Ariana Grande & John Legend - Beauty and the beast (Cori) (K5) - by Maker.mp3


Furthermore, I would use the "Copy files to destination" method until you are positive it's matching and moving properly.  Keep in mind that you can really screw things up with FilePunter if you're not sure you know what you're doing.  Hence, all the simulation/test modes I offer in the program.
« Last Edit: October 21, 2018, 01:29 PM by skwire »

dariotoby

  • Participant
  • Joined in 2018
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: DONE: Organize files into folders based on flename wildcard parsing
« Reply #67 on: October 23, 2018, 08:46 AM »
Great fantastic beautiful I did 30 seconds that required work days. You are great

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 552
    • View Profile
    • Donate to Member
Seems all files are placed into single folder.  Original nested folders as well.  No mirrored folders appear to be created.

Is there a way to copy the original folder structure, too?

Thanks!

Nicholas Kormanik

 

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Seems all files are placed into single folder.  Original nested folders as well.  No mirrored folders appear to be created.

Is there a way to copy the original folder structure, too?

For File Punter to recreate the original folder structure, you would have to match parts of the source folder structure you wanted and re-use them to recreate the destination.  However, if you're just looking to copy/mirror over a folder structure and files, File Punter is NOT the app for you.  Use one of the myriad of file/folder synchronization apps out there.  If that's not what you need to do, please give me detailed information on what you need to accomplish.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 552
    • View Profile
    • Donate to Member
Thanks, Skwire, for clarifying.  Yes, wanted to move all .mp3 files from folder A to folder B, keeping the entire folder structure where the .mp3 files reside.

Will try another app.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
wanted to move all .mp3 files from folder A to folder B, keeping the entire folder structure where the .mp3 files reside.

A simply copy/cut and paste would not work here?  Am I missing something?

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 552
    • View Profile
    • Donate to Member
100,000 .mp3 files -- intermixed with other formats, such as .flac -- in a giant tree structure.  Branches of trees are "Artist" and "Album".

I wanted to move ONLY the .mp3 files to another drive, leaving .flac, etc., where they are.

As you've said, a myriad of programs out there to do it.  Such as xcopy, robocopy, richcopy.

Thought it best to use a gui program, to see more clearly what's about to happen... before pressing go.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member

anandcoral

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 777
    • View Profile
    • Free Portable Apps
    • Donate to Member
100,000 .mp3 files -- intermixed with other formats, such as .flac -- in a giant tree structure.  Branches of trees are "Artist" and "Album".

I wanted to move ONLY the .mp3 files to another drive, leaving .flac, etc., where they are.

As you've said, a myriad of programs out there to do it.  Such as xcopy, robocopy, richcopy.

Thought it best to use a gui program, to see more clearly what's about to happen... before pressing go.


I suggest to use Total Commander https://www.ghisler.com/
You can filter on *.mp3 and press Ctrl+B, then F5 copy to new folder.
All sub folders will be created automatically.

Regards,

Anand