Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to specify an order for renaming files

See original GitHub issue

Hi there! Thanks for this awesome lib 😄

I’m trying to prefix files in a folder with indexes but I would like to be able to do it in a specific order, e.g.: in order of size, addition date, etc…

I would be willing to work in such a feature and submit a PR if you think it’s a good idea! I believe we could use Node’s fs.Stats Class properties to be able to specify an order-by property and do the ordering before mapping over the files array.

What do you think about this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

75lbcommented, Jun 14, 2018

Work on this feature is in progress. In the next version you will be able to supply a file list via stdin, giving you full control over the files processed and their order. In this example, input comes from the output of find via sort:

$ find . | sort --reverse | renamer --find one --replace two

For the most precision, you could hand-roll a file containing one filename per line and pipe it into renamer.

$ cat file-list.txt | renamer --find one --replace two
ebastidascommented, Jan 7, 2018

@tibuurcio would appreciate a lot this new feature!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rename File List to Order
In this tutorial, we'll guide you through the step by step procedure to batch rename file list to order with readable and friendly...
Read more >
How to rename multiple files in Windows with PowerRename
1. Open the PowerToys Settings window by double-clicking its System Tray icon. Select the entry for PowerRename. Turn on the switch for Enable...
Read more >
Rename Files & Folders Sequentially - FileBoss
1) Select the files you want to rename with sequential numbers · 2) Select Actions > Rename... from the main menu · 3)...
Read more >
Save Time: How to Rename Multiple Files at Once in Windows
To rename multiple files from File Explorer, select all the files you wish to rename, then press the F2 key. The name of...
Read more >
Renaming files in sequential order - Microsoft Community
Hi,. I would suggest you to try these steps and check. Select all the photos by pressing CTRL + A keys, right click...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found