Welcome Guest.   Make a donation to an author on the site September 01, 2014, 04:17:05 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Free DonationCoder.com Member Kit: Submit Request.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 [2] 3 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: Organize files into folders based on flename wildcard parsing  (Read 16004 times)
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #25 on: March 12, 2010, 10:30:32 AM »

Give this a test (source/binary included): File Punter

It's not fully feature complete as of yet but the core functionality is in there.  It should be pretty intuitive.

1) Use the top section to create and add your match filters to the list.
2) Checkmark the rows you want to process.
3) Choose your method at the bottom and click Start.  Progress and such is shown in the statusbar.  You can cancel at any time.
4) All checked rows will be processed in order.  You can move highlighted rows up and down through the list with ctrl-up and ctrl-down before clicking Start.
5) You can delete rows by highlighting and pressing delete.
6) The list is saved/loaded automatically when you close/launch the app.  No other settings are saved at this point.

The three methods you can choose from are:

1) Copy files to destination.  Self-explanatory.
2) Move files to destination.  Self-explanatory.
3) Simulation only.  This mode won't touch your files.  It will just create a text report that will show which files matched your filters and their destinations.  You can use it as a sort of "test run" mode.  Keep in mind that if your filter matches a very large number of files, the resulting text file can get pretty large, too.  Depending on path lengths involved, figure about a meg per 9000 lines/matches.

Put it through its paces and let me know how it works out for you.  If it seems solid enough, I'll add in my usual Skwire Empire stuff and release it as a full-fledged app.  Thanks and apologies for the delay in getting this to a release candidate.

« Last Edit: March 12, 2010, 10:36:23 AM by skwire » Logged

tomos
Charter Member
***
Posts: 8,480



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #26 on: March 12, 2010, 10:43:04 AM »

I studied programming waaaay back in the 70's (BASIC, COBOL and FORTRAN on an NCR mini coding onto 80-column  punch-cards!) which, while they are certainly not current languages, should give me some structural guidelines. I've also coded in dBase IV and similar (Foxbase etc.) and in  VBasic. In fact, I ran the very first BBS here in town on a 300 baud dialup modem using a Z80 computer running the entire system in interpreted BASIC!

Hi Mick,
an off-topic note:
you may be interested in this thread: In rememberance of....The antiquated hardware/software reminiscence thread
Tom
Logged

Tom
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #27 on: March 12, 2010, 11:45:29 AM »

As an aside, keep in mind that this has had, obviously, minimal testing.  In other words, I'd make some backup copies of your photos first.   cheesy
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #28 on: February 11, 2011, 08:27:47 AM »

Hello, hopefully in this my first post, I get things right.


First Files2Folder is a great utility

The thought I have which may be a new utility or enhancement of the existing.

I often encounter files in the following formats

first part - middle part - last part.extension
or
first part - last part.extension

It would be nice to be able to select a group of files and have the utility folderise by a defined segment, though to make it easier.

option 1
Anything before the first " - "

option 2
Anything after the last " - " (ignoring extension)

There may be other cases, but I suspect it would be more complex to handle.

When run the utility would create folders based on content for the defined option.

If a folder already exists, there is no need to create

Files are then added to the appropriate folder.

In case of duplicates, files are enumerated, or ignored, though in theory this should not happen from an existing folder, but may if further files are added for subsequent processing.


I am guessing there may already be something out there that does this, but I have yet to find it. And then probably nothing with the simplicity of Files2Folder

Thanks in advance

 
Logged
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #29 on: February 11, 2011, 11:42:13 PM »

Hello, hopefully in this my first post, I get things right.

Welcome to DonationCoder.  Thanks for posting and enjoy your stay.

First Files2Folder is a great utility

I'm glad you find it useful.   smiley

The thought I have which may be a new utility or enhancement of the existing.

I often encounter files in the following formats

first part - middle part - last part.extension
or
first part - last part.extension

It would be nice to be able to select a group of files and have the utility folderise by a defined segment, though to make it easier.

option 1
Anything before the first " - "

option 2
Anything after the last " - " (ignoring extension)

I think this is well out of scope for Files2Folder but you're in luck.  I have another application that I haven't fully released that should do what you want.  What it lets you is specify source folders and then write a simple regular expression with which you can create destination folders that uses data matched by the regular expression.  If you're not familiar with regular expressions, that description probably won't make much sense so here's an example (based off of yours):

Source folder:         c:\path\to\
Containing files like: first part - middle part - last part.extension
RegEx string:          (.*?) - (.*?) - (.*?).extension
Destination folder:    c:\path\to\??2


Each "(.*?)" represents a matched subpattern.  I've highlighted in red the second matched subpattern and how you could use it to automatically create a destination folder based off of text within the filename.  The app then gives you the option to copy, move or simulate.  Based on the above, it would copy/move said file to the following:

c:\path\to\middle part\first part - middle part - last part.extension

Does that make sense?  Would you be interested in something like this?
Logged

skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #30 on: February 11, 2011, 11:55:54 PM »

Also, can you give me more information on the types of files you want to shift around?  Are they music files by chance?
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #31 on: February 12, 2011, 05:15:37 AM »

Many thanks for the response. The description I gave was in the simplest form, as I can see other potential later. I am actually sorting pictures

The idea came from using Calibre and how it stores ebooks based on regular expressions. Unfortunately it puts each item into a subfolder of the group, rather than directly in the group, which would have meant i could have used Calibre to do the grouping.

The problem is selecting the images into sets. Most have one or other of the formats mentioned for the filenames, but there are multitudes of variants, and the list is continually growing. Automating the folderising would reduce the biggest manual part of the process to an insignificant number.

Once grouped, they can be placed in CBR format and loaded into calibre as sets or stored elsewhere.

So it does sound like what you have may work, I can always give it a try, maybe iron any bugs too if they exist
Logged
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #32 on: February 12, 2011, 06:28:12 AM »

Would you mind giving me some examples of the filenames and paths you're working with as well as how/where you would like them to end up?  If they're sensitive names, either change them or PM me the list.  I can then let you know if this application will work for you.
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #33 on: February 12, 2011, 07:30:02 AM »

Many thanks for the quick reply.

The structure is in many ways quite simple, and I can adjust some of it if needed as I go, such as moving each set files to source folder, which effectively elliminates the possibilities of collisions.

Once a batch has been processed, I can physically move the generated folders to a new location, before processing another set. They can then be moved on completion, and windows can handle the collisions for me, and i can the adjust the folder name if needed.

In the following examples i can put "myfolder" anywhere needed in the path i.e. drive:\\myfolder if it makes things easier.

Most of the images are either in the format

myfolder\image00001 - location.jpg
or
myfolder\location - image00001.jpg

There are a number where I incorporate date such as

myfolder\image00001 - location 15-02-2004.jpg
or
myfolder\2004-02-15 location - image00001.jpg
or
myfolder\location 15-02-2004 - image00001.jpg

In these cases i can see the extra "-" being a possible problem, but i can work around that as once they are in their sets, I have other tools I can utilise.

There are also a few files in the format

location - 15022004 - image00001.jpg

But i have means to easily remove the first "-" so reducing it to one of the previous variants.


Destination for each set would be
mydestinationfolder\location\

Though as we are only starting in

myfolder\

and there are no existing subfolders, unless there is a programming reason, I can see no reason why the destination can't just be

myfolder\location\
Logged
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #34 on: February 12, 2011, 08:38:51 AM »

In the following examples i can put "myfolder" anywhere needed in the path i.e. drive:\\myfolder if it makes things easier.

The application lets you make a list of source/pattern/destination entries and save them.  Sort of like a profile.  You can use simple wildcard matching to move files but, in your case, you will need to use regular expressions since you want to move them to dynamically created destinations.  After setting up your entries, you can then check/uncheck entries as necessary and only run those.  Here's a screenshot:



Most of the images are either in the format

myfolder\image00001 - location.jpg
or
myfolder\location - image00001.jpg


There are a number where I incorporate date such as

myfolder\image00001 - location 15-02-2004.jpg
or
myfolder\2004-02-15 location - image00001.jpg
or
myfolder\location 15-02-2004 - image00001.jpg


In these cases i can see the extra "-" being a possible problem, but i can work around that as once they are in their sets, I have other tools I can utilise.

Shouldn't be a problem with regular expressions.

There are also a few files in the format

location - 15022004 - image00001.jpg

But i have means to easily remove the first "-" so reducing it to one of the previous variants.

Again, regular expressions should easily be able to work around this.

Destination for each set would be
mydestinationfolder\location\

Though as we are only starting in

myfolder\

and there are no existing subfolders, unless there is a programming reason, I can see no reason why the destination can't just be

myfolder\location\

Yep, not a problem.  The software offers a test mode that creates a text file of what will be move/copied and where.  This way, you can test your regular expression to see if it does what you want.  If you use instant messaging, feel free to add any of the accounts here:

http://skwire.dcmembers.com/wb/pages/contact.php

If you don't mind and, since this app hasn't been released to too many people, I'd like to work with you directly to make sure it does what you want.
« Last Edit: February 12, 2011, 08:41:15 AM by skwire » Logged

skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #35 on: February 13, 2011, 03:05:11 PM »

Magician62 has been doing some really good testing of File Punter on his image files and, I'm happy to say, we've got File Punter to what I feel comfortable for a Skwire Empire release.  Thanks, magician62!   Thmbsup

I also merged his topic into this original File Punter thread.

Website | Download
v1.0.4 - 2011-02-13
    * Made simulation mode the default option.  (Thanks, magician62)
« Last Edit: February 13, 2011, 06:05:28 PM by skwire; Reason: Fixed my typo of magician62\'s nick. Thanks, 4wd. =] » Logged

4wd
Supporting Member
**
Posts: 3,293



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #36 on: February 13, 2011, 05:53:38 PM »

Thanks, magician32!   Thmbsup

It obviously took it's toll on him smiley
Logged

Four wheel drive: Helping you get stuck faster, harder, further from help...........and it's no different on this forum Evil
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #37 on: February 13, 2011, 06:06:18 PM »

It obviously took it's toll on him

OMG...fixed!  Thanks.  =]
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #38 on: February 15, 2011, 05:02:34 PM »

One issue found during testing which was not reproducible other than on my own system was the case of only Deskop and Current User appearing in the Browse for Folder Dialogue box for add /edit entry. It was believed that it might be Win7-64.

Well discovered the cause/fix as I also found another until had started to encounter the same issue. elsewhere.  You can read about it yourselves at Browse For Folder -- Missing Computer,and Libraries

But in summary, there is a limit on the number of icons on the desktop. When you exceed the number say byebye Browse For Folder functionality.
Logged
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #39 on: June 18, 2012, 02:46:39 PM »

Website | Download
v1.0.5 - 2012-06-18
    + Added "Create shortcuts" mode.  (Thanks, nkormanik)
    + Added Check/Uncheck toolbar buttons.
Logged

nkormanik
Participant
*
Posts: 284

View Profile Give some DonationCredits to this forum member
« Reply #40 on: June 21, 2012, 09:07:30 PM »


Two enhancement requests:

1)  Skwire, I do feel it would be quite a bit more reassuring to show the total number of lines/commands selected to be seen somewhere -- status line or elsewhere.  I'd just feel more at ease seeing that number.

2)  Perhaps, also, allow configuration .ini to set default location in which to begin, from which to open text files containing command lines.  My preference is to look in same directory where the executable is.  For whatever reason when I say Open, File Punter wants to look in Desktop.  I keep all the text file commands within the File Punter executable directory buried somewhere else.

Thanks!
Logged
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #41 on: June 22, 2012, 12:07:45 AM »

Website | Download
v1.0.6 - 2012-06-22
    + Last used folder is remembered for File, Open action.  (Thanks, nkormanik)
    + Added status bar section showing total number of rows and total number of
      checked rows.  (Thanks, nkormanik)
Logged

y0himba
Charter Member
***
Posts: 423



Yar.

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #42 on: January 03, 2013, 10:46:09 AM »

Not to resurrect a dead thread, but I have been using File Punter a lot.  I was wondering if there is command line support?  I would like ot be able to use task manager to run it at a regular interval to organize files.  The Perl flavored RegEx is beautiful.
Logged

My Web Site:  http://www.y0himba.net
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #43 on: January 03, 2013, 11:08:42 AM »

Unfortunately, no, there isn't any command-line support for this application.   Sad
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #44 on: October 26, 2013, 04:20:37 PM »

For source dir you can use a network location

\\NAS\START

but you can not use for destination.

On Update Entry

Error dialogue
Destination DRIVE does not exist. Please chose a valid destination.

At present the only solution is to map the drive to a letter.
« Last Edit: November 24, 2013, 07:44:08 AM by magician62 » Logged
magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #45 on: November 24, 2013, 07:22:58 AM »

And to add a feature request or two.

When you start to get long list of options, it would be nice to be able to insert a blank line smiley

Additionally, it would be nice to be able to apply to folders. (The contents of the folder would go with the folder to it's new destination no matter what their name)

And one other option, a Notes column to allow us a reminder of what the option was for in the first place smiley
« Last Edit: November 24, 2013, 07:44:32 AM by magician62 » Logged
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #46 on: November 25, 2013, 10:10:25 AM »

Error dialogue
Destination DRIVE does not exist. Please chose a valid destination.

At present the only solution is to map the drive to a letter.

I did some testing on this and it seems to be an AutoHotkey bug/limitation.  There are a few solutions I can think of:

  • Turn off the sanity checking for the destination drive (I'm loathe to do this).
  • Make the sanity checking for the destination drive optional (hidden INI option).
  • Leave it as is so that mapped drives are the solution.


When you start to get long list of options, it would be nice to be able to insert a blank line smiley

This shouldn't be a problem.

Additionally, it would be nice to be able to apply to folders. (The contents of the folder would go with the folder to it's new destination no matter what their name)

Ehhh...I'll have to give this some thought.  No promises on this one.

And one other option, a Notes column to allow us a reminder of what the option was for in the first place smiley

Good idea, actually, and easily doable.
Logged

skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #47 on: December 04, 2013, 09:45:55 PM »

I didn't add the blank line request as I felt it was inelegant.  I'll give it some more thought.  Also, if you don't mind, I'd like to merge this thread with the original File Punter thread.

Website | Download
v1.0.7 - 2013-12-04
    + Drag-n-drop reordering in the listview is now possible.
    + Added icons to the menus.
    + Added description column.  (Thanks, magician62)
    * Application is now DPI aware.
« Last Edit: December 04, 2013, 09:54:20 PM by skwire » Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #48 on: December 08, 2013, 03:20:17 PM »

Hi Jody, sure merge away smiley I am at present splitting my time between several time eating tasks and trying to prepare for the holiday season. I have just downloaded and will test shortly.

The odd thing about the path's is that a network location works for the source just not destination.


It doesn't help that I am still installing software after replacing the HDD and starting from scratch in an attempt to find what program has been causing the computer to effectively stall at times, with no obvious processor or memory issues, then it just continues!
Logged
skwire
Moderator
*****
Posts: 4,038



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #49 on: April 09, 2014, 12:03:51 AM »

Website | Download
v1.0.8 - 2014-04-09
    ! Using pipes in pattern strings would screw up their display in the
      dropdown list.  (Thanks, Christian)
Logged

Pages: Prev 1 [2] 3 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.059s | Server load: 0.09 ]