or Connect
AVS › AVS Forum › Video Components › Home Theater Computers › Using a batch file to move Recorded TV across hard drives
New Posts  All Forums:Forum Nav:

Using a batch file to move Recorded TV across hard drives

post #1 of 6
Thread Starter 
Hi guys, sorry if this isn't the appropriate forum for this.

As I cannot record + watch the recorded channel live directly to the FlexRaid drive, I figured I'd record everything to a spare 320GB WD Blue drive I had and then transfer the recordings to the flexraid nightly at like 4:00 AM
(my same issue http://forum.flexraid.com/index.php/topic,969.msg8396.html#msg8396)


Is a scheduled batch file the best way to do this?

I have my DVR box setup as follows:

OS: Win 7 x64

3 x 3TB HDD in FlexRaid.......................(E:\)
1 x 320GB HDD for temp recordings......(H:\)
1 x 60GB SSD for OS............................(C:\)

I figured I'd have the batch file copy the files to E:\ and then delete the recordings from H:\ ?

What if there's a recording occurring at 4:00 AM? Will the batch file still copy the recording but fail to delete it since it's "in use" ?


Here's what I came up with:
Code:
robocopy "H:\Recorded TV" "E:\Recorded TV" /E /COPYALL /MOVE /ETA /TEE /LOG+:migration_log.txt
pause
Code:
/E :: copy subdirectories, including Empty ones.
/COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
/MOVE :: MOVE files AND dirs (delete from source after copying).
/ETA :: show Estimated Time of Arrival of copied files
/TEE :: output to console window, as well as the log file.




Is this the best way do to this?

Thanks guys.
Edited by pratiken - 1/11/13 at 9:51pm
post #2 of 6
Hi,

I'm not sure what OS you're using but I'm using XP and I run the following batch file every night for the same effect but for a different reason.

move E:\npvr\*.* E:\PVR\

This command moves all files in a folder called NPVR to a folder called PVR (both on E drive). In my case, these files are recorded shows.
I would assume for your scenario...
1) Create a folder on H: drive. Let's assume H:\PVR
2) Let's assume you have a folder on E drive called E:\PVR

Then,

move H:\PVR\*.* E\PVR\

Use windows task scheduler to run the batch at 4am (perhaps wake the machine to run the batch?)

What this will do is move the contents of the folder "PVR" on H drive to a folder "PVR" on the E drive

Based on your OS, the syntax may or may not be different.
post #3 of 6
Thread Starter 
Thanks for the reply!

I'm using Win7 x64

That seems like a much simpler method! For some reason, I figured a simple "move" command wouldn't work since I'm moving it to another hard drive. How would it handle recording files that are in use? (currently recording) Have you happened to try that before?
post #4 of 6
I would think it would ruin (ie split) a file currently being recorded, so I would not let that happen. The "when' of the batch you have to think through. My advice was only the how.
post #5 of 6
Thread Starter 
Gotcha!

Look what I just found! Great tip on moving recordings when they're completed.

http://www.thegreenbutton.tv/forums/viewtopic.php?p=6279&sid=5969b89430e471744eba94c229b72bcc#p6279
post #6 of 6
You might want to check out WTV-MetaRenamer.

It is PowerShell script that will rename the file with season and episode number and move them to your server into appropriate folders.

New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Home Theater Computers
AVS › AVS Forum › Video Components › Home Theater Computers › Using a batch file to move Recorded TV across hard drives