Hello I have this code someone helped me here:
forfile /p "c:" /s /m *.pdf" >junk.text
for /f "tokens=1 delims=." %%F in ('type junk.txt') do (convert %%F.pdf" %%F.jpg")
This is the original link with all explanation and history:
Is working perfect no problem at all. What it does is look for PDF's inside all sub directories inside "c:\data\" then convert that pdf's to jpg and that jog is stored in the same directory the original pdf it is. For example we have just one sub directory inside "c:\data" called "one" it means "c:\data\one" and that sub directory "one" has 2 pdfs called 1.pdf and 2.pdf (of course is an example only names could be anything and sub directories is insde "c:\data" could be any number). Now if you run the script add inside "c:\data\one" 2 jpgs called 1.jpg and 2.jpg because like I mentioned before the converted jpgs must be with the name of the original pdf of where it was converted and saved in same location of that original pdf.
Now the script does exactly like we want is prefect but someone could help us in add in the code a condition that if the jpg corresponding to one pdf exist in the directory and skip the conversion and continue with the other file and so on with all sub directories inside "c:\data" and all pdfs inside each sub directory of "c:\data". We want to do this because we add new sub directories to "c:\data" so frequent and there a re a lot of new sub directories and if we run the script process all and re-convert all the already converted files and there is no need to re-convert what it was converted because takes so long talking in days times.
I hope someone can help.