All Questions
5 questions
3
votes
2
answers
420
views
How might one except hidden '.' files and directories from a script that renames them?
I have a script that renames, getting rid off the whitespace, every directory and file. It does it recursively:
#!/bin/bash
find -name "* *" -print0 | sort -rz | \
while read -d $'\0' f; ...
3
votes
5
answers
4k
views
Sort files into multiple directories based on filename?
I have 1000s of files in a single directory that I want to sort into subdirectories based on their filenames. They're all consistently named with a set structure of p-[number]_n-[number]_a-[number].[...
2
votes
1
answer
319
views
Renaming and rearranging multiple filenames without rename
I have almost 500 directories full of files with names like e141107140847.pdf, and I need to rename them to something user-friendly like 2014_11_SDUXS_0847.pdf. I've been trying to use a for loop and ...
3
votes
2
answers
13k
views
Using a variable with rename command
I want to use the rename command to remove characters on a file basename, based on characters entered (input) by the user in an interactive script.
Basically, I would like to do this:
read ...
1
vote
1
answer
2k
views
shell rename file names with non-printable characters
I'm trying to find a way to batch rename file names which originally contains Japanese characters, which are non-printable in my shell.There is clearly something I'm missing here in understanding how ...