NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 3 4 5 6 7 … 56 Next »
Yet Another RenameRecordings Batch files

 
  • 0 Vote(s) - 0 Average
Yet Another RenameRecordings Batch files
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,802
Threads: 954
Joined: May 2006
#31
2011-07-24, 03:49 AM
There's a potential error in the batch files earlier in this thread, there is no guarantee that the short name to the Program Files folder is C:\Progra~2. I am sure the batch file will accept the full name if it is written correctly.

As for not locating NUtilty.dll NScriptHelper.exe must be the NPVR Program Files folder, if you update from the patch for x86 mode remember that installing patches requires admin right.

Also if you are trying to call a batch file from a batch file and want to return to the calling batch file remember the syntax is

CALL ANOTHER.BAT %*

Martin
JimF
Offline

Member

Posts: 217
Threads: 19
Joined: Oct 2005
#32
2011-07-24, 10:19 PM
mvallevand Wrote:There's a potential error in the batch files earlier in this thread, there is no guarantee that the short name to the Program Files folder is C:\Progra~2. I am sure the batch file will accept the full name if it is written correctly.
The first part of your statement is undoubtedly correct, but I have tried both

set NSHelper=C:\Program Files (x86)\NPVR\NScriptHelper.exe
set NSHelper="C:\Program Files (x86)\NPVR\NScriptHelper.exe"

with the new NScriptHelper.exe, and neither works.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,802
Threads: 954
Joined: May 2006
#33
2011-07-24, 10:56 PM
I just wrote this simple batch file

Code:
@echo off
echo %1
set NSHelper="C:\Program Files\NPVR\NScriptHelper.exe"
FOR /F "delims==" %i IN ('%NShelper -title %1') DO set title=%i
FOR /F "delims==" %i IN ('%NShelper -subtitle %1') DO set subtitle=%i
echo ren %1 "%~dp1%title - %subtitle%%~x1"

and NScriptHelper seems to works the way it should when I pass a filename

Martin
JimF
Offline

Member

Posts: 217
Threads: 19
Joined: Oct 2005
#34
2011-07-25, 01:37 AM
Yes, but you are probably on a 32-bit OS. I am running Win7 64-bit.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,802
Threads: 954
Joined: May 2006
#35
2011-07-25, 04:21 AM
I tried on my 64 bit client and while NScriptHelper works my simple batch file doesn't but it looks like a syntax problem with the batch file running in Win7 more than a problem with the utility.

Martin
nobody
Offline

Junior Member

Posts: 45
Threads: 3
Joined: Oct 2009
#36
2011-07-25, 05:05 PM
What i did was find and replace all the %NSHelper% with "C:\Program Files (x86)\NPVR\NScriptHelper.exe"
ouradu
Offline

Junior Member

Posts: 17
Threads: 1
Joined: Jul 2011
#37
2011-07-26, 04:33 AM
Jim, I got it to work using this at the beginning of the rename bat:

@echo off

REM make sure the file passed actually exists
if not exist "%~f1" goto error

set DBPath=C:\Users\Public\NPVR\npvr.db3
set NSHelper="G:\'Program Files <x86>'\NPVR\NScriptHelper.exe"
set subtitle=
set title=

echo Getting recording title
FOR /F "tokens=*" %%i in ('G:\"Program Files (x86)"\NPVR\NScriptHelper.exe -title "%~f1"') do SET title=%%i

echo Getting recording subtitle
FOR /F "tokens=*" %%i in ('G:\"Program Files (x86)"\NPVR\NScriptHelper.exe -subtitle "%~f1"') do SET subtitle=%%i

REM Make sure the variables aren't empty
if "%title%" == "" goto error
if "%subtitle%" == "" goto nosubtitle



The " and ' had to be the way they are and <x86> in the first reference and (x86) the second andthird times. Had to replace %NSHelper%.

Hope that helps.
JimF
Offline

Member

Posts: 217
Threads: 19
Joined: Oct 2005
#38
2011-07-26, 05:01 PM
ouradu,

That works fine. Thanks for the tip.
HDHomeRun Prime, Win7 64-bit, NPVR 3.4.8
b00sfuk
Offline

Senior Member

Posts: 319
Threads: 26
Joined: Mar 2005
#39
2011-07-28, 07:08 PM
Just started playing with this. I follow the logic and everything works up to updating the database. I got an error with NScriptHelper saying "Unable to file existing recording with filename...." . What I found was that these 2 settings were needed to be set to false in the config.xml file. (can't remember what defaults were so it might not affect everybody). Otherwise recordings can be removed after the renaming of the file but before the renaming in the database.

<AutoRemoveMissingRecordings>false</AutoRemoveMissingRecordings>
<CheckForRenamedRecordings>false</CheckForRenamedRecordings>

Was using the batch file posted earlier in the thread. To avoid this I guess it might be cleaner to have it copy the file first, then rename in database then delete the old copy of the file.
Silverstone LC10M with iMON
Gigabyte 780G+4850e, AMD 6570
Blackgold BGT3620, Harmony 555 Remote
Win7 32-bit, SAF
b00sfuk
Offline

Senior Member

Posts: 319
Threads: 26
Joined: Mar 2005
#40
2011-07-31, 09:04 AM
Just wanted to say thanks to SANGER_A2 for the batch file. With just a few minor tweaks (e.g. needed to rename the file after, not before, the database rename) it works great on my setup.
Silverstone LC10M with iMON
Gigabyte 780G+4850e, AMD 6570
Blackgold BGT3620, Harmony 555 Remote
Win7 32-bit, SAF
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (6): « Previous 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Generate NextPVR import XML from recorded TV .wtv files from WMC Jimixter 5 5,262 2021-05-06, 03:34 PM
Last Post: a1blues
  Generate missing thumbnails for video files imported into NextPVR Jimixter 0 2,573 2019-12-16, 07:28 PM
Last Post: Jimixter
  Files plugin tmrt 13 7,298 2014-01-09, 11:16 PM
Last Post: mvallevand
  Manual RenameRecording Batch File SANGER_A2 0 2,175 2011-10-08, 11:11 AM
Last Post: SANGER_A2
  NPVR Rename Recordings Batch File raceviper13 8 7,959 2011-04-23, 11:52 PM
Last Post: raceviper13
  Search DB batch util pBS 4 2,479 2009-09-03, 10:01 AM
Last Post: pBS
  Updated BDA scan files MixMan 1 2,179 2009-08-12, 08:19 PM
Last Post: martint123
  PostProcessing Dvr-MS files to remove comercial breaks crlorentzen 0 1,546 2008-09-13, 08:38 PM
Last Post: crlorentzen
  Batch to surely Hibernate & Update EPG dfdario 1 1,731 2008-03-09, 02:32 PM
Last Post: cakes
  NEW PLUG-IN: Files McBainUK 13 4,033 2007-06-05, 06:47 PM
Last Post: cybershaman

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

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

Linear Mode
Threaded Mode