Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create Delay before Completed File Move
#1
So with most of the files being in RAR format, I have built an automatic-extraction script (with a lot of help from others on this forum) that works wonderfully on files that are over ~1/2 Gb.  On ones smaller than that, which is the vast majority, the burst-transfer moves the completed files to my NAS faster than the script can execute the UnRAR (and yes, I do have the "do not delete until moving is completed" turned on - it's still not enough time).  What I would like to do is find a way to delay the moving process by several seconds in order for the UnRAR script to execute successfully before the completed files get moved.

It's not a system-speed issue as I have an i7-equivalent Xeon with a shared 48Gb RAM / RAMdisk that I use as my base download drive (before the Completion Move to the NAS).  Being a RAMdisk, the extraction would be borderline instantaneous, if the script could run before the move happened.
Reply
#2
Bump?
Reply
#3
How about you change your script to make a copy of the file, un-rar that and then delete the copy?

Or put a delay in your script and then have it un-rar from the file on the NAS back onto your local system?
Reply
#4
Both excellent ideas.  Unfortunately neither worked (as far as my limited programming skills are involved).  The current (and successful-when-can-run) command line is:
"H:\Utilities\WinRAR\WinRAR.exe" x %D\*.r* G:\

Drives involved are:
G - Destination drive
H - Location of WinRAR.exe
R - RAMdisk (by default, downloads to r:\VuzeTemp\)
V - NAS drive for completed files (V:\Completed\)

In trying to do the Copy->Extract, I used the following COPY.BAT commands
COPY %D R:\
"H:\Utilities\WinRAR\WinRAR.exe" x R:\%D\*.r* G:\
COPY R:\%F G:\
DELETE %D R:\

I tried this both with the Force use of Java's Way on and off:
On - No Archives Found
Off - Command does not run

I watched the R:\ to see if the file/folder was being copied at all, even for a fraction of a second, and no.  When running the batch file manually, the CMD screen appears, copies nothing (because the %D comand isn't recognized), and fails on step 2 where there is nothing to extract (%D failure).  At minimum, if the script was running successfully, it should copy the download folder to R:\ even if the extraction fails due to the path changing.


Second option is the DELAY.BAT one:
TIMEOUT 6
"H:\Utilities\WinRAR\WinRAR.exe" x V:\Completed\%D\*.r* G:\
COPY V:\Completed\%F G:\

With the exact results replicated as in the first option.  Manually running the BAT results in the CMD window running the timeout successfully, and failing on the %D portion (since Vuze isn't telling it the value).

In fact, I'm now wondering if that's the fundamental flaw to my script - is Vuze able to communicate the %D value to a command within a batch file?  And if not, then how would I do about putting multiple functions into a single command line?
Reply
#5
Hmm, you'd need to pass the %D as a command line argument to your script (assuming for sake of argument it is in H:\Utilities
 
script = H:\Utilities\COPY.BAT %D

or maybe even 

script = CMD.EXE /c H:\Utilities\COPY.BAT %D

and then in your .bat script you can reference arguments passed to it via %1 %2 etc

so the original %D would end up in %1

You might have to handle spaces in %D as well, quoting it perhaps?

Sorry, I'm no expert either!

https://www.microsoft.com/resources/docu...x?mfr=true
Reply
#6
Total bust. One variant said it couldn't find the requested files... Alternations and other more significant edits led it to not even trying to run. Even stripping it all the way back to "CMD.EXE", and nothing launches (maybe because there's no file path?)

This is just all getting really ugly... How difficult would it be to implement something like the following in the next version, under Completion Moving:

[_] Extract multi-part torrent before moving
Extract using program found at [_______________________]
Move extracted file(s) to [__________________]

I know it's work on the programming side, I just think that would have huge appeal for most users, and surely easier than figuring out the scripting issue.
Reply
#7
Has there been any further thought to this?

Also, I noticed that although this is turned on:
[X] Copy and then delete the original data.......

It actually doesn't work in the way I thought it would be intended, in that it copies then deletes each individual RAR portion, rather than successfully copying the ENTIRE folder, THEN deleting the source folder. If it worked in this manner, it would also create the necessary delay to have the extractor work successfully.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Exclamation Archiving N torrent create N*N entries Giangi 0 3,360 01-03-2018, 11:12 AM
Last Post: Giangi
  Deleting torrent delete .torrent file fields 3 6,753 12-14-2016, 06:09 PM
Last Post: nimack



Users browsing this thread: 1 Guest(s)