Recorded Tv Monitoring using Batch file

November 26, 2010 at 11:47:58
Specs: Windows XP
I'm trying to write a batch file to use on my media center and transfer files (recorded TV) to my Windows Home Server. I have written a batch file to convert any .wtv files in my recorded tv folder to .drv-ms files and run it as a Scheduled Task to run whenever media center has finished recording a tv show but as sometimes i am recording 2 shows at the same time i don't want the batch file to run on incompleted files (still recording) so i want it to compare the file size and only run if it has not changed since the last time it checked, say 10 seconds. That way it would only convert files that had finished recording.

Here's what I have already;

move "C:\Users\Public\Recorded TV\*.wtv" "C:\Users\Public\Recorded TV\To Convert\"
%WINDIR%\ehome\WTVconverter.exe "C:\Users\Public\Recorded TV\To Convert\*.wtv"
move "C:\Users\Public\Recorded TV\To Convert\*.wtv" "C:\Users\Public\Recorded TV\TV Backup\"
move "C:\Users\Public\Recorded TV\To Convert\*.dvr-ms" "C:\Users\Public\Recorded TV\Converted\"
copy "C:\Users\Public\Recorded TV\Converted\*.dvr-ms" "C:\Users\Public\Recorded TV\server"

I also need to move the converted files to the recorded tv folder on my windows home server but am unsure how.

I found this scipt on this forum but am unable to change it to my needs;

setLocal EnableDelayedExpansion

for %%a in (myfile) do (
set now=%%~za
if not exist %temp%\# echo !now!>%temp%\# && echo no prev && goto :eof
set /p prev=<%temp%\#
if !now! equ !prev! echo still same size && goto :eof

echo here's where you send the email
echo !now!>%temp%\#

Any help would be greatly appreciated

See More: Recorded Tv Monitoring using Batch file

Report •

November 26, 2010 at 12:31:23
Did you put the name of your file in place of myfile?

Life is too important to be taken seriously.


Report •

November 26, 2010 at 12:43:32
It will be different all the time so do I use a wildcard like "*.wtv" so that all .wtv files will be compared? And this script only run if the file size was different i want it to run if the file size remains the same since it was las checked.

Report •
Related Solutions

Ask Question