Jump to content

Script for finding all JPEG's in all subfolders of dir.


Go to solution Solved by JohnOne,

Recommended Posts

Posted

Hello, im trying to write a script that will go through a folder, pick out the JPEG's and then resize them changing the name to "BACKUP"originalname.jpg.

Im using a DOS command to give me a superdirlist, THE PROBLEM IS... it is only running through this sequence once but on that one go its working fine. So its only re-sizing one image. 

here is my script so far: (ill just include the part i think there is a problem with but let me know if any more would help)

$file = "E:ImageResizeNEWsuperdirlist.txt"

 

For $i = 1 to _FileCountLines($file)
    $line = FileReadLine($file, $i)
 
    FileClose($hFileOpen)
 
Local $filename = StringSplit($line, "")
For $i = 1 To $filename[0] ; Loop through the array returned by StringSplit to display the individual values.
        $doescontain = StringInStr($filename[$i], ".jpg")
If $doescontain <> 0 Then
MsgBox($MB_SYSTEMMODAL, "", "$filename[" & $i & "] - " & $filename[$i])
 
 
        EndIf
 
Next
 
Here is the contents of my superdirlist.txt:
 
E:ImageResizeNEW20140316_162236.jpg
E:ImageResizeNEW20140316_162246.jpg
E:ImageResizeNEWFolder
E:ImageResizeNEWsuperdirlist.txt
E:ImageResizeNEWFolder20140406_142320.jpg
 
THANK YOU!!!!!
 
 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...