View previous topic :: View next topic |
Author |
Message |
martix
Joined: 20 Apr 2007 Posts: 17
|
Posted: Tue Nov 13, 2007 8:45 pm Post subject: Problem with renaming order |
|
|
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 |
|
 |
martix
Joined: 20 Apr 2007 Posts: 17
|
Posted: Tue Nov 13, 2007 8:54 pm Post subject: |
|
|
Suggestion - Allow users to edit own posts.
Ok, another thing I forgot to add - counter should start from 0, not 1... |
|
Back to top |
|
 |
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Thu Nov 15, 2007 7:14 am Post subject: |
|
|
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 |
|
 |
martix
Joined: 20 Apr 2007 Posts: 17
|
Posted: Fri Nov 16, 2007 1:57 pm Post subject: |
|
|
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...
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 |
|
 |
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Sat Nov 17, 2007 8:49 pm Post subject: |
|
|
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 |
|
 |
martix
Joined: 20 Apr 2007 Posts: 17
|
Posted: Tue Nov 20, 2007 8:39 pm Post subject: |
|
|
Thanks allowing edits.
The WinRAR's format is like: rar, r00, r01, r02, r03 and so on... Splits whatever you are archiving into several files of equal, user specified size... |
|
Back to top |
|
 |
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Wed Nov 21, 2007 6:17 am Post subject: |
|
|
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 |
|
 |
|