|
Answer» Hi
To START i must say that i use Xp pro but the batch need also work on 2k..
That's what i want to do
I got files.jpg in a specific folder. For each files i want to resize and change the DPi
i want to put in a txt files the name of the last modified file.
The problem is that i want to use Irfanview to work on the jpg but it don't accept wildcards.
I think to use a For loop but i don't succeed...
One more QUESTION, how i can put in a text file at line n the first line of an other txt files ??
Sorry for my poor english..
Thanks for any help..
@+MaxAssuming you have all the *.JPG files in 1 folder.
Do this first:
DIR /B *.JPG >JPGLIST.TXT
in a DOS script, use the FOR command.
@echo off echo. FOR /F "delims=" %%I in (JPGLIST.TXT) do (
Echo Opening file %%I with infranview INFRANVIEW.EXE %%I ECHO Moving customized file to processed folder. MOVE %%I .\PROCESSED )
This will process all the files in the JPGLIST.TXT, one by one. It will open INFRANVIEW.EXE with only that file in question. After you close infranvie, it will move the file to a processed directory. It will then loop and re-open infranview onto the next file. Hi
Thanks for your answer, i'll try it as soon as possible..
An idea for the last question ?
Thanks again
@+MaxRe
so i try that
REM -------------------------------------------------------- REM Listage des fichiers REM -------------------------------------------------------- dir /b /o:-N H:\DAP\*-J.jpg > H:\DAP\Jacq.txt
REM -------------------------------------------------------- REM Redimmensionnement en 340*340 sous 72 Pixel/pouce REM -------------------------------------------------------- FOR /F "delims=" %%I in (H:\DAP\Jacq.txt) do ( Echo Traitement du fichier %%I avec Irfanview C:\PROGRA~1\IRFANV~1.97\i_view32.exe H:\DAP\%%I ECHO D‚placement du fichier modifi‚ %%I dans /Jacquettes MOVE H:\DAP\%%I H:\DAP\JACQUE~1\ )
and it work but i want to add command lines for irfanview and i try this: REM -------------------------------------------------------- REM Listage des fichiers REM -------------------------------------------------------- dir /b /o:-N H:\DAP\*-J.jpg > H:\DAP\Jacq.txt
REM -------------------------------------------------------- REM Redimmensionnement en 340*340 sous 72 Pixel/pouce REM -------------------------------------------------------- FOR /F "delims=" %%I in (H:\DAP\Jacq.txt) do ( Echo Traitement du fichier %%I avec Irfanview C:\PROGRA~1\IRFANV~1.97\i_view32.exe H:\DAP\%%I /dpi=(107,107) /jpgq=100 /killmesoftly ECHO D‚placement du fichier modifi‚ %%I dans /Jacquettes MOVE H:\DAP\%%I H:\DAP\JACQUE~1\ )
and it don't work, i think to the (..) of the parameters but not sure. Any idea to solve the prob (an other soft...)
Thanks for the help
@+Max
|