How can I convert pictures from directory and all its subdirectories and keep the directory-tree of the stores and converted files?
I tried to get this way over creating a filelist but I got the problem to keep the folders of the pictures from filelist in the destination directory...
The following command converts all files from a filelist into C:\TEST
Filelist has content like this:
c:\PIC\A.JPG
c:\PIC\SubDir1\B.JPG
c:\PIC\SubDir2\C.jpg
and was created by using: "dir C:\PIC\ /A-D /S /B > C:\filelist.txt"
(by the way nconvert has problems, if the filenames has german umlauts äöü..) Can't open file... it should be optional to use the OEM DOS-Char set.)
Code: Select all
nconvert.exe -ratio -out jpeg -o "c:\test\%.jpg" -keepfiledate -q 80 -resize 800 800 -l C:\filelist.txt
Conversion of c:\PIC\A.JPG into c:\test\A.jpg OK
Conversion of c:\PIC\SubDir1\B.JPG into c:\test\B.jpg OK
Conversion of c:\PIC\SubDir1\C.JPG into c:\test\C.jpg OK
=> C:\filelist.txt
=> C:\filelist.txt
Error: Don't know how to read this picture (C:\filelist.txt)
Okay the 3 converted PICs are successfully stored in C:\TEST, but I would like to keep the Directory-Structure, too... therefore my question: How can I keep the folders of the pictures from filelist in the destination directory C:\TEST:
I tried this command by modifying the option -o:
Code: Select all
nconvert.exe -ratio -out jpeg -o "$%.jpg" -keepfiledate -q 80 -resize 800 800 -l C:\filelist.txt
In my opinion, a new option would be usefuel to add the folder without drive-letter?
-o filename : Output filename
Use # to specify position of numeric enumerator
Use % to specify source filename
Use $ to specify source folder "i.g.: C:\ABC\"
NEW: Use & to specify source folder (from filelist) without driveletter "i.g.: PIC\SubDir1\"
So the command with this new option -o "C:\TEST\&%.jpg" should save the convertetd pictures into the same directory-structure:
C:\TEST\PIC\A.JPG
C:\TEST\PIC\SubDir1\B.JPG
C:\TEST\PIC\SubDir1\C.JPG
whats your opinion?
Thanks Tom.