|
Recorded TV file copy batch file
|
|
11-17-2010, 02:12 PM
Post: #1
|
|||
|
|||
|
Recorded TV file copy batch file
While I am currently running without a Home Sever, I do like to keep all my RecordedTV file on the lounge PC as that's where 99% of TV watching happens.
During the day, the kitchen PC is on and records any daytime TV that the wife likes to watch (like 60 Minute Makeover ) but I'd like this copied across to the lounge PC when it comes on at 6.45pm each day (a timed BIOS setting).So given that I've been delving into Linux recently I thought it can't be that diffiicult to create a batch file in Windows that will automatically copy the files across. And how right I was as to the simplicity of it! You simply create a new text file in Notepad that invokes the DOS 'move' command with the location of the files you have, and where you want them to end up. Save this as filename.bat somewhere and then using Task Scheduler, create a Basic Task to start the batch file at a given time (6.50pm daily for me when I know the Lounge PC has just booted). The line in my batch file reads: start /MIN move /Y D:\Record~1\60*.* L:\ So from the above line
So that's it. If I wanted all shows copied across then I would leave out the 60 and just have *.* You could even have the Task Scheduler run the batch file every 30 minutes to move across shows from one PC to another all day long. I also see that the Task Scheduler can be triggered from a list of pre-defined Windows operations. I might see if I can find one that represents the termination of a Media Center recording. That would be handy! I know there are other hacks to copy across RecordedTV shows to another drive but I like the simplicity of this batch file. I might even resurrect my little standalone NAS drive to use as a RecordedTV storage... hmmmm. elootos - mediacenterhouse.com This forum has no strict rules, just those I make up as I go along! |
|||
|
11-17-2010, 02:34 PM
Post: #2
|
|||
|
|||
RE: File copy batch file
(11-17-2010 02:12 PM)elootos Wrote: I also see that the Task Scheduler can be triggered from a list of pre-defined Windows operations. I might see if I can find one that represents the termination of a Media Center recording. That would be handy! Delving into Task Scheduler a bit more, I see you can trigger events according to certain logs in the Windows Event Logs, so if I find what the log is for when a recording stops in Media Center, I may be in business! elootos - mediacenterhouse.com This forum has no strict rules, just those I make up as I go along! |
|||
|
11-19-2010, 10:11 AM
Post: #3
|
|||
|
|||
RE: File copy batch file
(11-17-2010 02:34 PM)elootos Wrote: Delving into Task Scheduler a bit more, I see you can trigger events according to certain logs in the Windows Event Logs, so if I find what the log is for when a recording stops in Media Center, I may be in business! I've now managed to get the Task Scheduler (type 'Task Scheduler' in the Start menu) to run the batch file when any recorded TV finishes! As per the first post in this thread that mentions triggering the task at a set time, the task can also have an event trigger. I started by modifiying the original batch file so that it now moves all contents of the RecordedTV folder across to the lounge by removing the 60 of the original file location. The command now reads: start /MIN move /Y D:\Record~1\*.* L:\
Looking through the Event Viewer (type 'event viewer' in the Start menu), and browsing to the Media Center section, it showed that all scheduled recorded shows were logged with an Event ID of 1, and recordings manually stopped early were logged with an Event ID of 3. er, log from my laptop so not many Media Center Events. So in the Task Scheduler, I started again by adding 'Create Basic Task', triggered by an event, selecting the Media Center log from the drop-down menu and add an Event ID of 1, and that then starts a script that is my one line batch file. Once done, you can edit the properties of the task and add another event trigger, this time adding another from the Media Center log, Event ID 3 (manual stopping of recorded TV). I was pretty chuffed when I saw the command window flash up copying the shows when recordings finished. ![]() If you 'Create New Task' in the task Scheduler instead of a basic task, you can get a bit more hands-on with it and have one trigger with 2 IDs seperated by a comma rather that one trigger per Event ID - this would be handy if there were a load of Media Center events you wanted to trigger one batch file. Now the only thing left to do is have the batch file close the DOS window as when I tested this, it remained open. Shouldn't be too hard to do, should it? Off I go to Google... Once all this is done and worked out, it should only take about 60 seconds from start to finish in the future to setup. Now I'm definately going to dust off my Synology NAS drive and get it running in the kitchen cupboard. When mapped to the three Media Centers in the house with the same drive letter, it should just start consuming the TV shows as they finish recording. How Media Center itself will function with shows copied/deleted right under its nose is another thing. I might set an hourly repeat on the schedule as well so there's a fall-back. This may not look like a pretty solution but if it works. elootos - mediacenterhouse.com This forum has no strict rules, just those I make up as I go along! |
|||
|
11-26-2010, 03:06 PM
Post: #4
|
|||
|
|||
|
RE: Recorded TV file copy batch file
While googling recently I see that my batch file to copy RecordedTV has already been covered on other sites before, and there I was thinking I was being original!
![]() However those that do store their RecordedTV this way seem to give it the thumbs up so it seems to be a winner. My Synology NAS (DS-107) that I've dusted off for the purpose of storing my TV shows is playing up a little though. It's a great little 1 drive unit that runs its own Linux OS (currently Synology's DSM 3.0) that is very user friendly and also allows you to look at CPU and RAM usage on it, and it shows that file transfers to it are maxing its CPU out at 100% with the Samba file sharing service. Because of this I'm getting about 4MB/sec onto it which is crap. So quite why a NAS with its own bespoke OS should grind to a halt on file transfers is a little worrying. I'm thinking because of its age I should try and roll back to an earlier software update for it. Then when its working properly I'll get my batch file running 24/7 to copy TV onto it. elootos - mediacenterhouse.com This forum has no strict rules, just those I make up as I go along! |
|||
|
01-03-2011, 10:51 PM
Post: #5
|
|||
|
|||
|
RE: Recorded TV file copy batch file
Hi
Did you manage to get this sorted? I am looking at a change of set up and this could prove useful |
|||
|
01-04-2011, 01:48 PM
Post: #6
|
|||
|
|||
RE: Recorded TV file copy batch file
(01-03-2011 10:51 PM)newstuart Wrote: Hi Yes, and no. ![]() Yes I got it working, but I have yet to actually implement it in use. My Synology NAS unit is running at about 1MB/sec transfer speeds with its little CPU maxing out, so until I fix that, it's going to have to wait to be utilised as a full-time feature. The other mentions of this method on the internet all seem to be happy with it. elootos - mediacenterhouse.com This forum has no strict rules, just those I make up as I go along! |
|||
|
01-04-2011, 03:28 PM
Post: #7
|
|||
|
|||
|
RE: Recorded TV file copy batch file
That's a pretty neat solution . . .
![]() I'm currently using SyncToy to much the same effect . . . it just takes away the need to know anything about DOS commands and linux - just a simple interface for setting up 'pairs' of folders to copy / move / consolidate etc and these tasks can be triggered by windows task manager similar to your solution offers . .
_______________________________________________ http://www.clifford-wright.co.uk/blog - My Random Witterings |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Recorded TV stutters a few seconds after fast forwarding | dave_allen77 | 3 | 911 |
05-30-2011 10:38 PM Last Post: dave_allen77 |
|




) but I'd like this copied across to the lounge PC when it comes on at 6.45pm each day (a timed BIOS setting).




