4 Replies Latest reply on Nov 24, 2015 4:40 AM by sarfrazm7834471

    How to get files from sub folder by Apple Script

    sarfrazm7834471 Level 1

      tell application "Finder"

        set ArtFolder to choose folder with prompt "Select Art Folder: ---->>"

        set ChapNameFolders to list folder ArtFolder without invisibles

       

        repeat with ChapFolder in ChapNameFolders

             set ArtFiles to files in ChapFolder

             display dialog (count ArtFiles)


             repeat with ArtFileItem in ArtFiles 

                  set FileInfo to info for ArtFileItem

                  set FileName to name of ArtFileItem

                  if folder of FileInfo is true then

                       display dialog FileName as string

                  end if

             end repeat

       

        end repeat

      end tell

      ===========================================>>

       

      I Used above code for getting files from subfolder, but it not working, It fails in Second REPEAT & not getting files from sub-folder....

      AnyOne can help me to solve this problem.....

      Thanks.