OnUploadComplete to scan for 100% and perform command when found
i am trying to create a .bat file to autoextract and move the contents that were extracted when the string 100% is found in a directory name. the .bat i think can look something like this
if not exist *100%* exit
rar.exe x -y %rarfile %path\x\
if exist %path\x\*.avi (
move %path\x\*.avi %path\..\
rmdir /s /q %path
) else exit
the problem is, i dont know how to pass the variables along.
if i passed %[environment(PATH)] along with OnUploadComplete could i use it in place of %path as %1 or something?
is there any kind of variable or method to get the name of the rar to extract?
if i have rar.exe in my system32 folder, would i need to designate a path?
to get a better understanding of what im trying to accomplish, someone sends me a tv show to /tv/show/show-episode. i want it to autoextract the show and move it to the parent directory so the path would then be /tv/show/show.avi. i just have never scripted anything for ioftpd before, i might be way out of the ballpark on this, any help is much appreciated
|