Closed joeldebruijn closed 10 months ago
If this is still available, Would like to try it out
@joeldebruijn after checking the docs I don't think that is possible. The best I got is adding a space or hyphen:
f2 -f '(\d{4})-(\d{2})-(\d{2}) (\d{4})__(\d{8})_(\d{4}).gpx' -r '$5-$6 00.gpx'
but I think having a simple character that escapes the $6
will solve the problem like -r '$5-$6/00.gpx'
.
@joeldebruijn @msalbrain
This should do what you want:
f2 -f '(\d{4})-(\d{2})-(\d{2})__(\d{8})_(\d{4}).gpx' -r '$4-$5 00.gpx' -f ' '
Of course, you can use a different character instead of a space.
See: https://github.com/ayoisaiah/f2/wiki/F2-tutorial#chaining-renaming-operations
Subsequently adding a character and removing it, neat! And lots of characters to choose from with small/zero chance being there in any other way. Thnx!
I'm renaming with tokens and want to add numbers, for example:
f2 -f '(\d{4})-(\d{2})-(\d{2}) (\d{4})_(\d{8})(\d{4}).gpx' -r '$5-$600.gpx'
Use case:
Problem I think: Token nr 6 + characters 00 actually looks like token number 600.
Is there a way to concatenate 00 after a token number?