NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 242 243 244 245 246 … 433 Next »
Copy file to Series-Episode.ext with Windows SendTo

Copy file to Series-Episode.ext with Windows SendTo
miken
Offline

Junior Member

Posts: 5
Threads: 2
Joined: Mar 2013
#1
2013-10-15, 04:01 AM
Targeted copy of a specific file from default naming format to Series-Episode.ext using Windows SendTo.

I set this up using Windows 8 x64, your mileage may vary. Specifically you probably have at least change the path name to NScriptHelper.exe. The path on my system is C:\Program Files (x86)\NPVR\NScriptHelper.exe, yours may be different.

As an alternative to doing mass renames/copies, or to doing a rename/copy triggered by PostProcessing.bat, I set up an easy way to rename/copy a specific file with a simple right click.

1) Place this script that I called CopyToSeriesEpisode.bat in a directory. I placed it in C:\Users\Public\NPVR\Scripts so that it could be used by other NPVR scripts, but for these purposes it could go anywhere.

Code:
@echo off

set subtitle=
set title=
set filepath=%~dp1
set fileext=%~x1
set source=%~f1
set sourcefn=%~n1
set sourcepath=%filepath%
set destpath=%filepath%

FOR /F "tokens=*" %%i in ('C:\"Program Files (x86)"\NPVR\NScriptHelper.exe -title "%source%"') do SET title=%%i

FOR /F "tokens=*" %%i in ('C:\"Program Files (x86)"\NPVR\NScriptHelper.exe -subtitle "%source%"') do SET subtitle=%%i

set title=%title:?=-%
set title=%title:/=-%
set title=%title:\=-%
set title=%title::=-%
set title=%title:&=-%

set subtitle=%subtitle:?=-%
set subtitle=%subtitle:/=-%
set subtitle=%subtitle:\=-%
set subtitle=%subtitle::=-%
set subtitle=%subtitle:&=-%

set destfn=%title%-%subtitle%%fileext%
set dest=%filepath%%destfn%

echo -----------------------------------------------
echo source path is %sourcepath%
echo source file is %sourcefn%
echo fileext     is %fileext%
echo series      is %title%
echo episode     is %subtitle%
echo dest path   is %destpath%
echo dest file   is %destfn%
echo -----------------------------------------------
echo.
echo copying %sourcefn% to %destfn%

copy "%source%" "%dest%"


2) Navigate to that directory, right click on this batch file and select "Create Shortcut". This will create a shortcut file called "CopyToSeriesEpisode - Shortcut".

3) Rename this shortcut file to whatever is meaningful to you. I renamed it to "CopyToSeriesEpisode NPVR script".

4) Find your Windows SendTo folder and move the shortcut to that folder. On my system it is C:\Users\((your user name))\AppData\Roaming\Microsoft\Windows\SendTo .

5) Now navigate to your NPVR recording directories and right click a recorded file. Select Send To and then CopyToSeriesEpisode NPVR script. The file is copied to the same directory as the source.



I use mc2xml for my EPG and it apparently includes subtitle information. I suppose it is possible your EPG does not include subtitle info depending upon the source. But you should be able to modify this to suit your needs.

Thanks to johnsonx42 and others for their example scripts using NScriptHelper.

As a follow-up question, is there an up to date doc on NScriptHelper somewhere? I saw a post a few days ago where sub intimated that another option was going to be added, I think it was date related. I'm wondering what other options exist for NScriptHelper.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Add Series/Episode Info to Recording Metadata andrewj 2 983 2023-11-20, 03:42 PM
Last Post: sub
  incorrect frequency in adelaide .ini file spin35 5 2,942 2023-02-01, 05:40 PM
Last Post: sub
  ts file shows length too long? SuttonWillow 2 1,862 2021-03-15, 01:56 PM
Last Post: mvallevand
  Lights-Out for Windows Home Server 2011? TuckerDean 1 1,304 2021-01-28, 01:52 PM
Last Post: mvallevand
  Screensaver on Windows 10 NumberFive 0 1,050 2020-12-24, 10:21 AM
Last Post: NumberFive
  Unhandled Exception: file name too long (idiots at pbs made it super long) jobby99 1 1,375 2020-10-29, 09:40 PM
Last Post: mvallevand
  ts file shows length too long SamM 4 2,300 2020-10-06, 02:45 AM
Last Post: Ehrlichia
  Flashing in on-screen graphics (Windows 10) (Can post logs if needed) bgtees 39 12,494 2020-08-19, 12:38 PM
Last Post: Stanno
  EPG displaying small subset of xmltv file. Esteban 9 2,945 2020-07-18, 10:07 PM
Last Post: Esteban
  Lights-Out for Windows Home Server 2011 pvrip 6 3,191 2020-05-21, 04:56 PM
Last Post: Madlec

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

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

Linear Mode
Threaded Mode