I'm using a wonderful program called ExifTool to recursively rename a large batch of files.Here is example usage:$ exiftool -r -ext JPG '-FileName<CreateDate' -d %Y%m%d_%H%M%S.jpg .Error: './folder1/110310_135433.jpg' already exists - ./folder1/source.jpgWarning: No writable tags found - ./folder2/110404_095111.jpg   68 directories scanned 1650 image files updated    5 image files unchanged    2 files weren't updated due to errorsWhen processing very large batches of images, the number of files not updated due to errors is often in the hundreds, therefore moving each file individually with mv is out of the question.I'd like to simultaneously move the files with errors/warnings to a separate directory for further processing.I need to extract the paths of the problem files from the terminal output and move them together, but I'm not sure how to achieve this.How would I go about this?For what it's worth, I am using Ubuntu 11.10.
Simultaneously move long list files to new location
bash;ubuntu;command line;filesystems
This will extract the filenames from the errors/warnings of exiftool and create a replica directory tree under the folder `unprocessed' with only those files. Didn't try to just move them in a single directory to avoid the risk of overwriting files with the same name but different source dirs.exiftool ... 2>&1 | tee exiftool.log | egrep '^(Error|Warning)' | \    sed 's/^Error: .* already exists - //;s/^Warning: .* - //' | \        while IFS= read -r img; do            rsync -vR -- $img unprocessed/            #rm -v -- $img        doneThe sed part takes into account only the output of the example provided, I'm not familiar with the tool and its possible output messages.EDIT: The rm part is commented out cause you better try this out first.