Comments (5)
Would you happen to be on FreeBSD?
from pipe-rename.
Ubuntu 20.4
from pipe-rename.
I can't replicate this on my machine 😕 Does this only happen for files with spaces or does this happen every time?
Are you able to compile the code? If so what happens if you run renamer with this line commented?
Line 328 in 53a97b8
from pipe-rename.
Error is shown even if file exists!
$ ls PARSIFAL - Bavarian State Opera-1.mp4 PARSIFAL - Bavarian State Opera-3.mp4 PARSIFAL - Bavarian State Opera-2.mp4 PARSIFAL - Bavarian State Opera.mp4
But these two files (!) do not exist, do they 😉?
And that is the reason why you shouldn't use ls
as input for pipes in general or parse its output, especially without some basic precautions. E.g. using ls -1
(and yes, some ls
flavors will turn this on when they detect a pipe) or ls -Q
(no idea if this would work, given how renamer implements its logic) etc.
The appropriate (and more powerful) option is to use find -type f
if you want to really pipe the input, but renamer will also happily do renamer *
for this particular case (proved by the output in your own initial comment).
$ ls | renamer The following input files do not exist: PARSIFAL - Bavarian State Opera-1.mp4 PARSIFAL - Bavarian State Opera-3.mp4 PARSIFAL - Bavarian State Opera-2.mp4 PARSIFAL - Bavarian State Opera.mp4 Error: Nonexisting input files. Aborting.
Yep, clearly they don't exist as your subsequent ls -la
proves. At least I don't see two files named:
PARSIFAL - Bavarian State Opera-1.mp4 PARSIFAL - Bavarian State Opera-3.mp4
PARSIFAL - Bavarian State Opera-2.mp4 PARSIFAL - Bavarian State Opera.mp4
... instead it's four files:PARSIFAL - Bavarian State Opera-1.mp4
PARSIFAL - Bavarian State Opera-2.mp4
PARSIFAL - Bavarian State Opera-3.mp4
PARSIFAL - Bavarian State Opera.mp4
... whose names end in.mp4
and starts withPARSIFAL
, right?
Your shell should have done the right thing for you with renamer *
and renamer would have interpreted it correctly (actually it did as the last line of output you provided proves).
What shell are you using? Perhaps provide the output of the following commands:
$SHELL --version; env|grep -E '^(LC_|LANG|EDITOR)'
from pipe-rename.
@mtimkovich @marcusbuffett I strongly suggest closing this. This seems to be a case of wrong usage rather than a defect in renamer
as I showed in my previous comment.
from pipe-rename.
Related Issues (20)
- Create directories if needed HOT 1
- Customize the editor command HOT 3
- Error: Nonexisting input files. Aborting. @FreeBSD HOT 14
- Create missing directories? HOT 2
- About tagging the releases HOT 2
- using pipe-rename in a pipe seems to misconfigure terminal HOT 6
- Crashing when editor closes, after editing a given line HOT 4
- Misbehaving on Windows without %EDITOR% HOT 2
- Sharing violation between Notepad and renamer on Windows HOT 3
- Idea: post-processing of certain characters HOT 2
- Can't pipe file names to pipe-rename without -y HOT 5
- `--rename-command` is broken for commands with arguments
- Provide binaries, please HOT 8
- Fix git workflows to automatically create binaries HOT 1
- About 1.6.5 release HOT 2
- Found an issue when renaming overwrites existing file HOT 2
- Doesn't seem to work with VSCode HOT 11
- Odd error message when attempting to pass full path to --editor HOT 5
- Renaming on a drive with case-insensitive file system (or a file system placed into that mode) HOT 1
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 pipe-rename.