Skip to main content
11 events
when toggle format what by license comment
Jun 11, 2020 at 14:16 history edited CommunityBot
Commonmark migration
Mar 12, 2017 at 13:59 comment added Zanna there are different versions yes. It might be called prename on your system @Frank
Mar 12, 2017 at 13:52 comment added Frank Are there different versions of the rename function? I seem to have access to a rename function as I can type rename in shell and it displays a usage screen yet your code doesn't appear to function. With the -n parameter it simply lists the rename usage and does nothing else. Removing the -n doesn't result in any errors yet the files remain unchanged.
Mar 12, 2017 at 13:17 comment added Zanna @Frank yes I edited my answer to do that :)
Mar 12, 2017 at 13:16 comment added Frank some file-170227-222746.png - so every file ends with 14 characters prior to the .png - if there were a command to remove exactly 14 characters (the -170227-222746 section) from the end of the file not counting the .png that would work flawlessly. To result in - some file.png
Mar 12, 2017 at 13:11 comment added Zanna @Frank answer edited
Mar 12, 2017 at 13:11 history edited Zanna CC BY-SA 3.0
edited body
Mar 12, 2017 at 13:10 comment added Frank Every file has a 14 character suffix.
Mar 12, 2017 at 13:08 comment added Zanna @Frank in that case, you need another way to distinguish the part you do want from the part you don't. Is the part you want to trim always the first number, or the first number of a specific length?
Mar 12, 2017 at 13:06 comment added Frank I'm running into a problem in that some filenames have a premature dash (-) resulting in too much information being trimmed. Is there a way to dictate removing the last 14 characters of the file? This would avoid any over trimming of filenames with an early dash (-)
Mar 12, 2017 at 12:27 history answered Zanna CC BY-SA 3.0