FileSelectFolder, OutputVar, , 3 ;This allows you to select what folder you will do a recursive search in later.
if OutputVar = ;if cancelled it exits the script
ExitApp
else
{
Loop, %OutputVar%\*.par2, , 1 ;this is the loop that finds all the *.par2 files
{
IfNotInString, A_LoopFileFullPath, .vol ;par files have vol files this excludes running any of the volume files
{
Run, %A_LoopFileFullPath% ;this runs the par2 fils from before
loop
{
IfWinExist, QuickPar - All Data Verified ;this happens if par2 is complete and no repair is needed
{
WinWait, QuickPar - All Data Verified
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
break
}
IfWinExist, QuickPar - Repair Succeeded ;this happens if par2 is complete and the repair is done
{
WinWait, QuickPar - Repair Succeeded
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
break
}
IfWinExist, QuickPar - Need ;this happens if par2 is complete and the repair can not be completed. i would like to move the folder where the par2 is contained and all the files also
{
WinWait, QuickPar - Need
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
;*********THIS IS WHERE I NEED HELP********** ;quickpar exited so the files are not in use anymore
;I AM HAVING TROUBLE MAKING THIS HAPPEN
;C:\EXAMPLE\EXAMPLE\DOWNLOAD\THISDIR
;should be moved to
;C:\EXAMPLE\EXAMPLE\DOWNLOAD\INCOMPLETE\THISDIR
:*********END OF HELP SECTION************
break
}
}
}
}
msgbox Completed recursive scan for all par2 files
}
return
Batch Par2 Help, CODE PROVIDED
#1
Posted 03 June 2006 - 11:36 PM
#2
Posted 04 June 2006 - 12:20 AM
#3
Posted 04 June 2006 - 12:52 AM
send !e
sleep, 250
;*********THIS IS WHERE I NEED HELP**********the Send !e is what closes quick par.If i need to commment my entire code i would be more then happy to. I actually decompiled it so i lost its comments
#4
Posted 04 June 2006 - 02:38 AM
Yes please. I'm not sure I understand but it looks as though you are trying to move the entire directory conditionally when you are in the middle of parsing the files contained in it...If i need to commment my entire code i would be more then happy to. I actually decompiled it so i lost its comments
#5
Posted 04 June 2006 - 03:14 AM
EDIT
Sorry i am not good at commenting : /
#6
Posted 05 June 2006 - 12:40 AM
If I understood what you want this might help.
OutputVar=Download ; Path to scan
Loop, %OutputVar%\*.par2, , 1
{
Loop, Parse, A_LoopFileDir , \
ParDir=%A_LoopField% ; Get the last part of the path
IfNotInString, A_LoopFileDir, \INCOMPLETE\ ; Check that the par2 file is not in the "INCOMPLETE" directory
{
FileMoveDir, %A_LoopFileDir%, %OutputVar%\INCOMPLETE\%ParDir% ; Move the dir to the "INCOMPLETE" directory
}
}
#7
help
Posted 24 February 2008 - 04:02 AM
last tip ist not working does nothing
#8
Posted 24 February 2008 - 04:25 AM
If the "last tip" is my code? how did you test it?1st part is working nicely
last tip ist not working does nothing
#9
help
Posted 24 February 2008 - 04:07 PM
;*********THIS IS WHERE I NEED HELP********** ;quickpar exited so the files are not in use anymore
;I AM HAVING TROUBLE MAKING THIS HAPPEN
;C:\EXAMPLE\EXAMPLE\DOWNLOAD\THISDIR
;should be moved to
;C:\EXAMPLE\EXAMPLE\DOWNLOAD\INCOMPLETE\THISDIR
:*********END OF HELP SECTION************
i am total noob
#10
Posted 24 February 2008 - 11:49 PM
I modified the FileMoveDir command so it would move the file even if the directory that the file was in already was in the INCOMPLETE directory.
Here is my code including the original code that works for me.
FileSelectFolder, OutputVar, , 3 ;This allows you to select what folder you will do a recursive search in later.
if OutputVar = ;if cancelled it exits the script
ExitApp
else
{
Loop, %OutputVar%\*.par2, , 1 ;this is the loop that finds all the *.par2 files
{
IfNotInString, A_LoopFileFullPath, .vol ;par files have vol files this excludes running any of the volume files
{
Run, %A_LoopFileFullPath% ;this runs the par2 fils from before
loop
{
IfWinExist, QuickPar - All Data Verified ;this happens if par2 is complete and no repair is needed
{
WinWait, QuickPar - All Data Verified
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
break
}
IfWinExist, QuickPar - Repair Succeeded ;this happens if par2 is complete and the repair is done
{
WinWait, QuickPar - Repair Succeeded
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
break
}
IfWinExist, QuickPar - Need ;this happens if par2 is complete and the repair can not be completed. i would like to move the folder where the par2 is contained and all the files also
{
WinWait, QuickPar - Need
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
;*********THIS IS WHERE I NEED HELP********** ;quickpar exited so the files are not in use anymore
;OutputVar=Download ; Path to scan
Loop, %OutputVar%\*.par2, , 1
{
Loop, Parse, A_LoopFileDir , \
ParDir=%A_LoopField% ; Get the last part of the path
IfNotInString, A_LoopFileDir, \INCOMPLETE\ ; Check that the par2 file is not in the "INCOMPLETE" directory
{
FileMoveDir, %A_LoopFileDir%, %OutputVar%\INCOMPLETE\%ParDir%, 2 ; Move the dir to the "INCOMPLETE" directory
}
}
;*********END OF HELP SECTION************
break
}
}
}
}
msgbox Completed recursive scan for all par2 files
}
returnHope this helps.jonib
#11
help
Posted 25 February 2008 - 12:45 AM
this one works like the first script
but it does not move anything incomplete in a incomplete dir
#12
Posted 25 February 2008 - 12:54 AM
When I run the script it moves any directory in the scan directory with .par2 files to the INCOMPLETE directory.
jonib
#13
help
Posted 25 February 2008 - 01:09 AM
but is it doable to make a directory inside every folder that ist called incomplete ?
anyway your solution is the best, thank you soo much
greets
nerdzone
#14
Posted 25 February 2008 - 01:29 AM
FileSelectFolder, OutputVar, , 3 ;This allows you to select what folder you will do a recursive search in later.
if OutputVar = ;if cancelled it exits the script
ExitApp
else
{
Loop, %OutputVar%\*.par2, , 1 ;this is the loop that finds all the *.par2 files
{
IfNotInString, A_LoopFileFullPath, .vol ;par files have vol files this excludes running any of the volume files
{
Run, %A_LoopFileFullPath% ;this runs the par2 fils from before
loop
{
IfWinExist, QuickPar - All Data Verified ;this happens if par2 is complete and no repair is needed
{
WinWait, QuickPar - All Data Verified
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
break
}
IfWinExist, QuickPar - Repair Succeeded ;this happens if par2 is complete and the repair is done
{
WinWait, QuickPar - Repair Succeeded
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
break
}
IfWinExist, QuickPar - Need ;this happens if par2 is complete and the repair can not be completed. i would like to move the folder where the par2 is contained and all the files also
{
WinWait, QuickPar - Need
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
;*********THIS IS WHERE I NEED HELP********** ;quickpar exited so the files are not in use anymore
Loop, Parse, A_LoopFileDir , \
ParDir=%A_LoopField% ; Get the last part of the path
IfNotInString, A_LoopFileDir, \INCOMPLETE\ ; Check that the par2 file is not in the "INCOMPLETE" directory
{
FileMoveDir, %A_LoopFileDir%, %OutputVar%\INCOMPLETE\%ParDir% ; Move the dir to the "INCOMPLETE" directory
}
;*********END OF HELP SECTION************
break
}
}
}
}
msgbox Completed recursive scan for all par2 files
}
returnThis one should work better.I don't know why not.but is it doable to make a directory inside every folder that ist called incomplete ?
Try this.
FileSelectFolder, OutputVar, , 3 ;This allows you to select what folder you will do a recursive search in later.
if OutputVar = ;if cancelled it exits the script
ExitApp
else
{
Loop, %OutputVar%\*.par2, , 1 ;this is the loop that finds all the *.par2 files
{
IfNotInString, A_LoopFileFullPath, .vol ;par files have vol files this excludes running any of the volume files
{
Run, %A_LoopFileFullPath% ;this runs the par2 fils from before
loop
{
IfWinExist, QuickPar - All Data Verified ;this happens if par2 is complete and no repair is needed
{
WinWait, QuickPar - All Data Verified
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
break
}
IfWinExist, QuickPar - Repair Succeeded ;this happens if par2 is complete and the repair is done
{
WinWait, QuickPar - Repair Succeeded
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
break
}
IfWinExist, QuickPar - Need ;this happens if par2 is complete and the repair can not be completed. i would like to move the folder where the par2 is contained and all the files also
{
WinWait, QuickPar - Need
WinActivate
send !e ;this will exit quickpar when it is done
sleep, 250
;*********THIS IS WHERE I NEED HELP********** ;quickpar exited so the files are not in use anymore
Loop, Parse, A_LoopFileDir , \
ParDir=%A_LoopField% ; Get the last part of the path
IfNotInString, A_LoopFileDir, \INCOMPLETE ; Check that the par2 file is not in the "INCOMPLETE" directory
{
FileCreateDir, %A_LoopFileDir%\INCOMPLETE
FileMove, %A_LoopFileDir%\*, %A_LoopFileDir%\INCOMPLETE\ ; Move the files to the "INCOMPLETE" directory
}
;*********END OF HELP SECTION************
break
}
}
}
}
msgbox Completed recursive scan for all par2 files
}
returnjonib
#15
nerdy1 help
Posted 25 February 2008 - 10:04 AM




