Skip to content

shorten-filenames.sh - Problem with whitespaces in path #3

@Linutux

Description

@Linutux

I have been using the script today. But unfortunately, it tries to stat each word in a file with whitespaces as a different file:

mv: der Aufruf von stat für 'Recht' ist nicht möglich: No such file or directory
shorten-filenames.sh: it appears that directory . has already been shortened. Aborting.
mv: der Aufruf von stat für 'gehabt!' ist nicht möglich: No such file or directory
shorten-filenames.sh: it appears that directory . has already been shortened. Aborting.
mv: der Aufruf von stat für 'Der' ist nicht möglich: No such file or directory
shorten-filenames.sh: it appears that directory . has already been shortened. Aborting.
mv: der Aufruf von stat für 'neue' ist nicht möglich: No such file or directory
shorten-filenames.sh: it appears that directory . has already been shortened. Aborting.
mv: der Aufruf von stat für 'Skoda' ist nicht möglich: No such file or directory
shorten-filenames.sh: it appears that directory . has already been shortened. Aborting.
mv: der Aufruf von stat für 'Octavia' ist nicht möglich: No such file or directory
shorten-filenames.sh: it appears that directory . has already been shortened. Aborting.
mv: der Aufruf von stat für 'RS' ist nicht möglich: No such file or directory
shorten-filenames.sh: it appears that directory . has already been shortened. Aborting.
mv: der Aufruf von stat für '2013...' ist nicht möglich: No such file or directory
shorten-filenames.sh: it appears that directory . has already been shortened. Aborting.
mv: der Aufruf von stat für '_' ist nicht möglich: No such file or directory
shorten-filenames.sh: it appears that directory . has already been shortened. Aborting.
mv: der Aufruf von stat für 'rad-ab.com.mhtml' ist nicht möglich: No such file or directory

The file name is "Recht gehabt! Der neue Skoda Octavia RS 2013... _ rad-ab.com.mhtml"

I tried to fix it myself, but don't know where. I think there a some quotes missing somewhere in the script...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions