Comments (14)
@nightson Would specifying the each file name in the regular expression not achieve what you want?
$ f2 -f 'a.jpg|3.png|q.txt'
That would work if you only need to rename a few files. If F2 supports file lists it could be easily integrated with other tools like Candy (an AHK script).
from f2.
@nightson Would specifying the each file name in the regular expression not achieve what you want?
$ f2 -f 'a.jpg|3.png|q.txt'
from f2.
Thanks for the clarification @nightson , I will add this feature very soon
from f2.
Thanks for the clarification @nightson , I will add this feature very soon
Cool! Kudos to your hard work!
from f2.
@nightson Here's how it currently works:
You create a CSV file like this (the second column is optional)
coverage.out,cover.out
LICENCE,license
README.md,README
f2.exe,f2.msi
And pass it to the csv
option:
$ f2 -csv 'input.csv'
+--------------+-----------+--------+
| INPUT | OUTPUT | STATUS |
+--------------+-----------+--------+
| coverage.out | cover.out | ok |
| LICENCE | license | ok |
| README.md | README | ok |
| f2.exe | f2.msi | ok |
+--------------+-----------+--------+
You can still use the -f
and -r
options but they will only operate on the paths in the CSV file.
from f2.
@nightson Here's how it currently works:
You create a CSV file like this (the second column is optional)
coverage.out,cover.out LICENCE,license README.md,README f2.exe,f2.msi
And pass it to the
csv
option:$ f2 -csv 'input.csv' +--------------+-----------+--------+ | INPUT | OUTPUT | STATUS | +--------------+-----------+--------+ | coverage.out | cover.out | ok | | LICENCE | license | ok | | README.md | README | ok | | f2.exe | f2.msi | ok | +--------------+-----------+--------+
You can still use the
-f
and-r
options but they will only operate on the paths in the CSV file.
Cool! Could you also add an option that allows passing the paths directly in the command line?
from f2.
@nightson How do you mean?
from f2.
Something like this
f2 -p path1 path2 path3 -f -r
from f2.
You can do that already. Add the paths after all options
$ f2 -f -r path1 path2 path3
from f2.
Sorry I didn't make myself clear. I meant the paths to the files to rename. F2 only supports directory paths to search for currently if I'm not mistaken.
Like this:
$f2 -f -r -p "C:\1.txt" "C:\2.txt" "C:\3.txt"
from f2.
@nightson Ok I understand now. I've adapted the code so that it works with both directories and file paths, so you can use either or both.
$ f2 -f -r path1 path/2/file.txt path3
from f2.
@nightson Ok I understand now. I've adapted the code so that it works with both directories and file paths, so you can use either or both.
$ f2 -f -r path1 path/2/file.txt path3
Cool. That's an even better implementation! Thank you!
from f2.
@nightson Please upgrade to the latest release: https://github.com/ayoisaiah/f2/releases/tag/v1.7.0
from f2.
@nightson Please upgrade to the latest release: https://github.com/ayoisaiah/f2/releases/tag/v1.7.0
Works like a charm. Thank you!
from f2.
Related Issues (20)
- x.cdt return None on some old image,exiftool shows DateTimeOriginal HOT 2
- [Help] How to match ISO date string HOT 2
- not working for me! HOT 3
- Fail to replace with RE HOT 3
- Data loss due to issue with --fix-conflicts HOT 6
- Cannot modify the file name of a file starting with '.' using .* matching? HOT 3
- [Question] Custom when fix conflicts HOT 1
- (Request) Making {%002d} more dynamically functional HOT 2
- Not working with basic regex? HOT 2
- Provide a GUI. HOT 1
- How to order numbers ORIGINAL correctly, for example 1 2 3 4 5 6 7 8 9 10? HOT 5
- Substitute from list HOT 12
- question bunch of files HOT 2
- Moving files to another directory outside starting path HOT 7
- Replace with case pattern HOT 1
- Donate via Patreon HOT 2
- Concatenate digits after a token number? HOT 4
- Regex end matcher `$` not working HOT 2
- [Docs] The Wiki Uses Incorrect Syntax HOT 2
- Feature idea - Set working directory HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from f2.