remove the last word
is there a chance to remove the last word?
example:
Lolita.LOLITA-01-ABOOK-Nabokov.Vladimir
>>
Lolita.LOLITA-01-ABOOK-Nabokov
example:
Lolita.LOLITA-01-ABOOK-Nabokov.Vladimir
>>
Lolita.LOLITA-01-ABOOK-Nabokov
Replace method...
Replace: \.[^\.]*$
with: leave blank
Use regular expressions
Replace: \.[^\.]*$
with: leave blank
Use regular expressions
Reply to #2:
I'm sorry but it doesn't work
I'm sorry but it doesn't work
Reply to #3:
That is because of the confusion between "." as part of the filename and "." as the separator between filename and extension. Windows will always assume that the end-most instance of "." indicates the extension and will treat any previous instances as plain text.
Thus.
In: Lolita.LOLITA-01-ABOOK-Nabokov.Vladimir
filename = "Lolita.LOLITA-01-ABOOK-Nabokov"
and extension = ".Vladimir"
In this case you can remove ".Vladimir" by simply deleting the extension...
Replace: *
with: blank
Use regular expressions: NOT checked
Apply to: Extension
However, in the result "Lolita.LOLITA-01-ABOOK-Nabokov"
the filename is now just "Lolita"
and the new extension will now be: "LOLITA-01-ABOOK-Nabokov"
Note that ARen will show an Error message "Extension changed" but this is only a warning and the batch will run and delete the extensions.
Using "." as part of a filename is always a bad idea!
I had assumed that your example just showed the filename and there would also an unspecified extension - eg "Lolita.LOLITA-01-ABOOK-Nabokov.Vladimir.txt" - in which case my solution will work.
That is because of the confusion between "." as part of the filename and "." as the separator between filename and extension. Windows will always assume that the end-most instance of "." indicates the extension and will treat any previous instances as plain text.
Thus.
In: Lolita.LOLITA-01-ABOOK-Nabokov.Vladimir
filename = "Lolita.LOLITA-01-ABOOK-Nabokov"
and extension = ".Vladimir"
In this case you can remove ".Vladimir" by simply deleting the extension...
Replace: *
with: blank
Use regular expressions: NOT checked
Apply to: Extension
However, in the result "Lolita.LOLITA-01-ABOOK-Nabokov"
the filename is now just "Lolita"
and the new extension will now be: "LOLITA-01-ABOOK-Nabokov"
Note that ARen will show an Error message "Extension changed" but this is only a warning and the batch will run and delete the extensions.
Using "." as part of a filename is always a bad idea!
I had assumed that your example just showed the filename and there would also an unspecified extension - eg "Lolita.LOLITA-01-ABOOK-Nabokov.Vladimir.txt" - in which case my solution will work.
Reply to #4:
:))))
I think I forgot to mention that I want to rename folders, sorry
:))))
I think I forgot to mention that I want to rename folders, sorry
Reply to #5:
If you are renaming folders then there is no reason why my original solution would not work.
I can confirm the folder "Lolita.LOLITA-01-ABOOK-Nabokov.Vladimir" is renamed to "Lolita.LOLITA-01-ABOOK-Nabokov", as required.
Check that you are entering the arguments correctly...
Replace Method
Text to be replaced: "\.[^\.]*$" (do not include the quotes)
Replace with: leave this blank
Occurrence: All or 1st
Case sensitive: irrelevant
Apply to: checked
If you are renaming folders then there is no reason why my original solution would not work.
I can confirm the folder "Lolita.LOLITA-01-ABOOK-Nabokov.Vladimir" is renamed to "Lolita.LOLITA-01-ABOOK-Nabokov", as required.
Check that you are entering the arguments correctly...
Replace Method
Text to be replaced: "\.[^\.]*$" (do not include the quotes)
Replace with: leave this blank
Occurrence: All or 1st
Case sensitive: irrelevant
Apply to: checked
Reply to #6:
ok
thx
ok
thx