View Single Post
Old 03-07-2015, 10:25 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Some sort of bulk rename tool might work.

EDIT: In linux, what about the following cli solution:

Code:
find -regex '\./.*\.\(azw3r\|mbp1\)' -exec sh -c 'for x; do ext=${x##*.}; needdir="${x%.*}.sdr"; fname="${x##*/}"; mkdir -p "${needdir}"; mv -- "${x}" "${needdir}/${fname}";  done' _ {} +
If you use Windows you just need to install Gow and use gfind instead of find, or use cygwin, or find your own solution. It seems from google that your average bulk rename program does not support creating directories, and I have no patience to find a windows batch/powershell solution (I am terrible at either).

Credits to http://unix.stackexchange.com/a/24141 and good ole trusty http://tldp.org/LDP/abs/html/string-manipulation.html (I am slowly getting the hang of it...)

Last edited by eschwartz; 03-07-2015 at 11:35 PM.
eschwartz is offline   Reply With Quote