avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • October 23, 2018, 10:53 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Final pieces of program  (Read 2313 times)


  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
Final pieces of program
« on: October 27, 2008, 05:34 AM »
Hi, i'am not sure if i am posting this in the right folder;
Skrommel made me this script, thanks for that :D

It is almost working, 1 crucial thing is not; the script only loops the 2 folders in the root. The loop must also contain subdirectories.
So when there is a tiff in \\sanfolder1\folder\folder\tiff.tiff
And in \\sanfolder2\folder\example\tioff.tiff

It also has to move the tiff into the output folder..

I add the script in my post, does anyone know how to loop also the subfolders?
Please help.. :o

MsgBox, EBN PDF-TIFF zoek tool v1.0 Zet de exe in de root van de te sorteren map met PDF's!

            ;Set variable for output folder

localfolder=d:\PDFS                              ;EBN Weebverzending PDF
sanfolder1=d:\san1                          ;SAN Folder1
sanfolder2=d:\san2                          ;SAN Folder2

Loop,%localfolder%\*,1                        ;Zoekt door de weekverzending
  IfInString,A_LoopFileAttrib,D                ;Kijkt of er mappen zijn
    MOVE(A_LoopFileName,sanfolder1,A_LoopFileFullPath)      ;Kijkt of diezelfde map bestaat in de sanfolder1
    MOVE(A_LoopFileName,sanfolder2,A_LoopFileFullPath)     ;Kijkt of diezelfde map bestaat in de sanfolder2




  Loop,%root%\*,1                           ;Zoekt door de root van de sanfolders
    If (A_LoopFileName=find)                  ;Als er een match is...
      FileMoveDir,%A_LoopFileFullPath%,d:\output\%find%      ;Verplaats de map naar de lokale folder


  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 467
    • View Profile
    • Circle Dock
    • Donate to Member
Re: Final pieces of program
« Reply #1 on: October 27, 2008, 10:18 PM »
From this thread http://www.donationc...ex.php?topic=14553.0 Skrommel wrote some AHK code that loops through a folder including the subdirectories and moves files out:

Example to move files out that have a .msf extension:
Code: AutoIt [Select]
  1. FileSelectFolder,folder,,2,Please select a folder
  2. If folder=
  3.   ExitApp
  4. Loop,%folder%\*.msf,0,1
  5. {
  6.   SplitPath,A_LoopFileLongPath,name,dir,ext,name_no_ext,drive
  7.   IfExist,%dir%\%name_no_ext%.sbd
  8.   {
  9.     FileGetAttrib,attrib,%dir%\%name_no_ext%.sbd
  10.     IfInString,attrib,D
  11.       FileMove,%dir%\%name_no_ext%.msf,%dir%\%name_no_ext%.msf.old
  12.   }
  13. }

I think you might simple have to change your loop lines to something with the "0, 1" parameters attached to the end.
Author of Circle Dock:
Author of Video In Picture:
Author of Webcam Signature:
Author of Easy Unicode Paster:
« Last Edit: October 27, 2008, 10:20 PM by VideoInPicture »