Welcome Guest.   Make a donation to an author on the site December 22, 2014, 07:38:21 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.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 2 [3]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: Organize files into folders based on flename wildcard parsing  (Read 17688 times)
magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #50 on: April 09, 2014, 12:40:06 PM »

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.
« Last Edit: April 09, 2014, 01:13:02 PM by magician62 » Logged
skwire
Global Moderator
*****
Posts: 4,186



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #51 on: April 09, 2014, 01:04:54 PM »

Hi Jody, a clue to the paths issue

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

http://www.donationcoder....21964.msg342772#msg342772
Logged

kiui
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #52 on: May 13, 2014, 01:24:05 PM »

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
Logged
skwire
Global Moderator
*****
Posts: 4,186



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #53 on: May 13, 2014, 01:38:15 PM »

Hi, Julien, and welcome to the DonationCoder site.   cheesy

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?
Logged

kiui
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #54 on: May 13, 2014, 01:42:36 PM »

Hello,
Here is the rule :
C:\Users\Administrateur\Desktop\test   (.*?)_ducs_PES_04-2014.pdf   C:\Users\Administrateur\Desktop\clients\??1   No   No   

Thanks
Logged
skwire
Global Moderator
*****
Posts: 4,186



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #55 on: May 13, 2014, 01:53:30 PM »

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.
Logged

kiui
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #56 on: May 13, 2014, 02:04:30 PM »

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  tongue )

Logged
skwire
Global Moderator
*****
Posts: 4,186



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #57 on: May 13, 2014, 02:32:33 PM »

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.   Wink  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  tongue )

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:23 PM by skwire; Reason: Grammar edit. » Logged

bastik
Supporting Member
**
Posts: 13


View Profile Give some DonationCredits to this forum member
« Reply #58 on: December 16, 2014, 08:37:39 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
[copy or print]
C:\source
to
[copy or print]
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
[copy or print]
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
[copy or print]
creative mind 12345.ext
to
[copy or print]
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
[copy or print]
creative mind
but the files say
[copy or print]
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
[copy or print]
D:\destination_path\??1 ??2\some_subfolder
to achieve that File Punter ignores the files. So that if folders with
[copy or print]
??1 ??2
are not present are not created?

If that is not possible, I'd like to suggest two new methods
[copy or print]
copy to existing folders
and
[copy or print]
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
[copy or print]
creative mind 12345.ext
to
[copy or print]
.../creative mind/subfolder/creative mind 12345.ext
which makes it a bit redundant. Is there a way to use File Punter to strip
[copy or print]
??1 ??2
from the files during the process?

Thank you for the program and thank you for anything you can say about my problems.
Logged
skwire
Global Moderator
*****
Posts: 4,186



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #59 on: December 17, 2014, 01:28:10 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.
Logged

Pages: Prev 1 2 [3]   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.037s | Server load: 0.08 ]