NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) GB-PVR Support (legacy) v
« Previous 1 … 815 816 817 818 819 … 1231 Next »
Batch File Challenge - Are you up to it?

 
  • 0 Vote(s) - 0 Average
Batch File Challenge - Are you up to it?
daphatty
Offline

Posting Freak

Posts: 1,032
Threads: 85
Joined: Feb 2005
#1
2006-02-04, 06:37 AM
I have a need for some advanced file management to be used in conjunction with GBPVR converted recordings. Specifically, I would like to have this batch file scan the root Recordings folders AND their subdirectories and Move all of the files that end in .MP4 and .THM to a predetermined location (UNC path support encouraged.)

I'd also like to find a way to run this batch file once a day (i.e. sometime after the conversion process completes). I realize that a batch file can't schedule itself (Big Grin) but I'm sure someone knows of a reliable way to automate this.
sgilani
Offline

Senior Member

Posts: 730
Threads: 72
Joined: Jan 2006
#2
2006-02-04, 06:50 AM
You can easily automate a batch (or anything) using Scheduled Tasks. (it's in control panel).
Clanky
Offline

Senior Member

Posts: 276
Threads: 57
Joined: Dec 2004
#3
2006-02-04, 08:39 AM
daphatty Wrote:I have a need for some advanced file management to be used in conjunction with GBPVR converted recordings. Specifically, I would like to have this batch file scan the root Recordings folders AND their subdirectories and Move all of the files that end in .MP4 and .THM to a predetermined location (UNC path support encouraged.)

I'd also like to find a way to run this batch file once a day (i.e. sometime after the conversion process completes). I realize that a batch file can't schedule itself (Big Grin) but I'm sure someone knows of a reliable way to automate this.

Try the following

Download Xmove & unpack.
Either copy xmove.exe to c:\windows or leave it in the same folder as the batch file

If your destination dir is on a network drive, map it to a drive letter, say x:
Create a batch file with the following lines

xmove g:\recordings\ *.mp4 x:
xmove g:\recordings\ *.thm x:

where g:\recordings is your root recs folder
RTR
Offline

Junior Member

Posts: 28
Threads: 4
Joined: Jan 2006
#4
2006-02-04, 10:02 AM
this can also be done with Robocopy that is included in the resource kit from microsoft.
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#5
2006-02-04, 03:13 PM
I thought of this already and have two scripts....

http://forums.nextpvr.com/showthread.php?t=13113

I'll be releasing my set up soon that will do the following:
encode to PSP
rename the file to PSP format
move the file to a 100MV01 directory
encode to normal TV avi file

All done at 3 AM every morning.

I'll add support for THM files soon Smile

it uses my mTranscode.vbs posted in the forums.
daphatty
Offline

Posting Freak

Posts: 1,032
Threads: 85
Joined: Feb 2005
#6
2006-02-25, 05:27 PM
Well, Xmove is almost exactly what I need. It managed to move the files that I wanted to my desired location but unfortunately it retains the folder structure from the source location. Does anyone know how to tell Xmove not to retain the folder structure?
turkey
Offline

Member

Posts: 206
Threads: 17
Joined: Sep 2005
#7
2006-02-25, 05:37 PM (This post was last modified: 2006-02-25, 05:54 PM by turkey.)
gbpvr kicks PostUpdateEPG.bat after every epg update. If you name your script this, you wouldn't have to worry about scheduled tasks. (That's what I do) I am pretty sure that there is a batch file that runs after the conversion process completes as well, i think it is called PostConvert.bat
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#8
2006-02-25, 09:37 PM (This post was last modified: 2006-02-25, 10:16 PM by pBS.)
here's my 'universal recursive batch file' Big Grin
it does almost anything recursively...
use 'recursive copy "x:\whereever\dir\*.thm" "f:\wherever you wnat it to go\"
or whatever single command you'd like to run...
just love that new FOR command in XP! lol
[this only works on xp for sure...may on 2000 too,dunno]

Code:
@echo off
rem             PBS's universal Recursive Batch File
rem  usage: recurse <command> <"files"> <extra params> <extra params>
rem Example: recurse  copy "e:\mpg stores\*.mpg" e:\psp\

rem %1 is command you'd like to run on each file individually
rem %2 is set of files to act upon [same as you'd get from a 'dir' command]
rem %3 %4 %5 etc. are extra parameters you can set for command to run

@for /F  "usebackq delims==" %%f in (`dir /b /s %2`) do call :process "%%f" %1 %3 %4 %5
goto :eof

:process
echo.
echo.
rem command you'd like to run and use %1 for individual filename and %2 %3,etc extra commandline parameters
rem change this to "echo %2 %1 %3 %4 %5" to see proposed output...
rem change this to %2 %1 %3 %4 %5 for it to do the work...

echo %2 %1 %3 %4 %5  
echo.

:end
:eof
save that as recursive.bat and run it with what you want to do..
[your case { move "\\server\share\dir\*.mp4" "\\server\share\destination" }
and { move "\\server\share\dir\*.thm" "\\server\share\destination" } ]
should work with net paths too...Smile
USE QUOTES WITH PATHS ON INPUT! [ex: "\\server\share 1\*.mpg" NOT \\server\share\*.mpg]
let me know how it works for you..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
A_Brass
Offline

Senior Member

Posts: 474
Threads: 22
Joined: Mar 2005
#9
2006-04-20, 12:36 PM
pBS,

I I was digging around looking for this thread 2 days ago. I was trying to do exactly what this thread described.

I wanted to thank you for posting your batch file. After tinkering with it for a few hours i found it works perfectly.
GBPVR Server:
AMD Sempron 3300+, 1gb DDR, 100, 200 & 500gb HDDs, DVD -/+RW PVR150 RETAIL, PVR150MCE.
GBPVR 1.0.16, SKIN'S = Default Blue, PLUGIN'S = None
MediaMVP
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#10
2006-04-20, 10:40 PM
cool...yea,i had to make it net path and long filename ready....
[i always test batches with files with spaces in filename and net paths]

just finished one that will enable burning shows to dvd from the transcode menu...in half the time...Big Grin
[now working on the menus..anyone know dvdauthor well? lol]
there's a thread around here somewhere that has my ffmpeg proxy to allow transcode menu to be run with *any* command..[transcode,add files to que etc.]
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  file types of recorded TV paul1 3 3,699 2012-09-30, 05:20 PM
Last Post: sub
  No Data In the Recorded File zb1 5 2,288 2010-08-24, 01:08 AM
Last Post: zb1
  Path to file being recorded. brianj 5 2,320 2010-08-08, 10:58 PM
Last Post: brianj
  error: failure playing back file yonu 4 2,058 2010-07-12, 12:52 AM
Last Post: yonu
  UK Freesat Scan.cache File jeffers 3 2,078 2010-05-25, 10:34 PM
Last Post: jeffers
  3 AC3Filter instances when playing back a still recording TS file? jksmurf 3 1,937 2010-05-17, 12:30 AM
Last Post: jksmurf
  Recording stops at 4gb file size experiencebliss 5 2,426 2010-05-04, 02:54 AM
Last Post: pBS
  Hauppage HVR-950q, no file created when recording, no pause. donbrowne 5 2,040 2010-04-08, 04:03 PM
Last Post: sub
  ffdshow postprocessing on .ts file playback alibert 2 1,708 2010-04-05, 05:33 AM
Last Post: alibert
  ATI Mux / mpeg file recordings playback issues topperdude 10 4,307 2010-03-29, 11:44 PM
Last Post: ww4397

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode