DonationCoder.com Software > Post New Requests Here
Final pieces of program
(1/1)
KoenFugro:
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
}
}
ExitAPP
MOVE(find,root,target)
{
Loop,%root%\*,1 ;Zoekt door de root van de sanfolders
{
IfInString,A_LoopFileAttrib,D
If (A_LoopFileName=find) ;Als er een match is...
{
FileMoveDir,%A_LoopFileFullPath%,d:\output\%find% ;Verplaats de map naar de lokale folder
Break
}
}
}
VideoInPicture:
From this thread https://www.donationcoder.com/forum/index.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 ---FileSelectFolder,folder,,2,Please select a folderIf folder= ExitAppLoop,%folder%\*.msf,0,1{ SplitPath,A_LoopFileLongPath,name,dir,ext,name_no_ext,drive IfExist,%dir%\%name_no_ext%.sbd { FileGetAttrib,attrib,%dir%\%name_no_ext%.sbd IfInString,attrib,D FileMove,%dir%\%name_no_ext%.msf,%dir%\%name_no_ext%.msf.old }}
I think you might simple have to change your loop lines to something with the "0, 1" parameters attached to the end.
Navigation
[0] Message Index
Go to full version