Batch File To Compare File Size

November 25, 2010 at 14:00:01
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.
Any help would be greatly appreciated

See More: Batch File To Compare File Size

Report •

November 25, 2010 at 17:51:46
You may get what you want by using the 'dir' extension. I would type: dir /? at the command prompt (cmd) to see what the escape switches should find your answer there.


Report •

November 26, 2010 at 01:56:17
Can anyone tell me what i need to add please

Report •

Related Solutions

Ask Question