Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (***NEW HOME PAGE*** "http://pfrank.atwebpages.com")
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with renaming order

 
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions
View previous topic :: View next topic  
Author Message
martix



Joined: 20 Apr 2007
Posts: 17

PostPosted: Tue Nov 13, 2007 8:45 pm    Post subject: Problem with renaming order Reply with quote

I'm trying to build be a set of renaming commands that are going to see an exponentially increasing use in the future.
Here's what I did:
Name Filter is regex:
.*\.[0-9]{3}

Row: 1
Search: '(.*\.)001'
Replace: '\1rar'
Row: 2
Search:
Replace: *Insert Counter after*All*
Row: 3
Search: '(.*)(\.)([0-9]{3})'
Replace: '\1\2r'
Row: 4
Search: _0
Replace: ''

Now trouble is - the 4th row(and my common sense) seems to suggest that its executing the rows consecutively, one after another. But the 1st row seems to defy that statement. What it should do is leave the file renamed in the first row out of the way of the counter insertion. But it appends a counter to that file too! Why???
And I don't need just to remove the counter part of the first file, I need it to start the counter from the second file.

Also a suggestion - include a "Copy as text" command. This way you could copy the renaming commands to the forum for example for support and that sort of stuff. Judging from my previous topic the format seems to exist and you can insert via Ctrl+F2, but not copy...
Back to top
View user's profile Send private message
martix



Joined: 20 Apr 2007
Posts: 17

PostPosted: Tue Nov 13, 2007 8:54 pm    Post subject: Reply with quote

Suggestion - Allow users to edit own posts.
Ok, another thing I forgot to add - counter should start from 0, not 1...
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Thu Nov 15, 2007 7:14 am    Post subject: Reply with quote

I'll try to address all your issues below:

1)
Just to clarify, each row of the custom renaming will try to operate on all names passed in from the name filter.
Subsequent rows operate on the modified names from previous plus also also any unmodified names.

Looks like you are trying to replace .001 extensions with .rar and then insert a counter for all files. The way things work is that the counter will be inserted for all names since there is no way of knowing which files you want to omit.
Are rows 3 and 4 trying to replace inserted counters with 'r' and remove leading 0's from those counters? If so, this would affect counters added with the 'insert counters' command.
I'm probably misinterpreting what you are trying to do.
If you would please specify what you are trying to do with clear examples of before and after names, then i'll try to help.

2)
The renaming commands can be copied from the summary panel using the mouse. I don't think I need a separate copy command.

3)
When you insert counters, you can specify where they start as well as alot of other parameters. Just go to the options window and choose the 'counter insertion' panel.

4)
I looked at the configuration options for editing posts. It looks like if I give registered users editing access, then they can edit any posts and not just their own. Therefore unless I'm convinced that is not the case, I'll restrict edits to the admin only.

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
martix



Joined: 20 Apr 2007
Posts: 17

PostPosted: Fri Nov 16, 2007 1:57 pm    Post subject: Reply with quote

I see... Thinking on it I guess I should be that way.

Well renaming one file on hand won't hurt if all others are done auto... Smile
If you need to know it takes files with names like:
foo.001; foo.002; etc. - incrementing the extension number.
Then renames them to the WinRAR "Split to volumes" format as they should be.

Also - I am certain that you can allow users to edit only own posts. I haven't played with phpbb for quite some time so I don't know where exactly it is.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Sat Nov 17, 2007 8:49 pm    Post subject: Reply with quote

What do filenames created via the winrar (split to volumes option) look like?

I've allowed editing for registered users. It looks like the editing is restricted to a user's own post. Thanks for pointing this out.

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
martix



Joined: 20 Apr 2007
Posts: 17

PostPosted: Tue Nov 20, 2007 8:39 pm    Post subject: Reply with quote

Thanks allowing edits.
The WinRAR's format is like: rar, r00, r01, r02, r03 and so on... Smile Splits whatever you are archiving into several files of equal, user specified size...
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Wed Nov 21, 2007 6:17 am    Post subject: Reply with quote

OK - it looks like you want to change a series of files like:

xxx.001, xxx.002, xxx.003 ... to xxx.r00, xxx.r01, xxx.r02
yyy.001, yyy.002, yyy.003 ... to yyy.r00, yyy.r01, yyy.r02

This can be done as follows:

1) In the custom renaming list, insert the following search info (don't include the single quotes):

Row: 1
Search: '(.*\.)[0-9]+'
Replace: '\1r'

This will remove the trailing numbers leaving you with alot of duplciate files.

2)
In the options window, choose the 'counter insertion' panel. Configure the panel for 2 digit number, with leading zeros. Configure the separator as a blank string. COnfigure the starting value to zero.

3)
In the options window, choose the 'scan and rename' panel. Check the boxes for 'restart resolver counter for each group of duplicates' and 'Use insert counter options for resolver string formatting'.
This will resolve the duplicates with the numbering that you want.

4)
Press the scan button. You'll be warned of resolved duplicate files; just press OK. Check the preview list by sorting by newname. You should confirm that the numbers are resolved in the correct order. The reason is that that renaming is done in sorted order so the new numbers should coincide with the old numbers but will instead start from zero.

Hope this helps!

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com