Custom Search
Join the PC homebuilding revolution! Read the all-new, FREE 200-page online guide: How to Build Your Own PC!
NOTE: Using robot software to mass-download the site degrades the server and is prohibited. See here for more.
Find The PC Guide helpful? Please consider a donation to The PC Guide Tip Jar. Visa/MC/Paypal accepted.
Results 1 to 7 of 7

Thread: Search and display movies

  1. #1
    Join Date
    Jan 2004
    Location
    Here
    Posts
    10,474

    Search and display movies

    I have six data drives in my media server totaling 13TB. Looking for an application, batch file, something, to search all the drives quickly and display all movies in one window. And the files are clickable.

    Windows search almost does it. The biggest issue is I don't want to search the C drive. I can enter a search like such:

    search for = .iso .mkv .mp4

    Can list each drive manually = f:\;g:\;h:\; etc

    and all comes out good. View as list, sort by name and it works fine.

    I can save the search and have it on the desktop and it saves what I am looking for (.iso etc) but it defaults to "all local drives" including C. Not a huge deal honestly, but there is nothing on the C drive I want and it slows the search looking through windows and program files. And although I have a KB hooked to the machine it sits on top of the tower behind the TV and I only get it out when I really need it. So typing the drives every time is a no go and my wife certainly won't do it.

    I have Power DVD 12 Ultra and it can do this in a very nice format, but it doesn't pick up ISO files, which 99%+ of the 900 movies are ISO files.

    Is there a way to edit the registry to set default search parameters for specific locations? And it would be really nice if it can default the view and sort to list and name. That way, my wife and kids can click the saved search, wait a few seconds and everything on all drives is displayed in an alphabetical list.

    Or is there a program out there someone can point me to that already does this? I searched but all I could find is database apps that don't scan, they only take manual entries and the files are not clickable.

    Is there a simple batch file that can do this and pump it out to explorer in the requested format? Again, I searched but could only find a way to send it to a simple text list. Maybe it is as simple as redirecting the output to explorer?

    Any help would be appreciated.
    8.1 Pro 64bit
    AMD FX 8350
    Asus Sabertooth 990FX R2.0
    24GB GSkill/Corsair 1866MHz
    2x XFX 6870 1GB
    SSD - OCZ V4 128GB/Kingston 120GB
    HDD - 3TB/2x 750GB/500GB/250GB
    Corsair TX850M
    Cooler Master HAF 932 Red
    CM Hyper 212 EVO w/2x SickleFlow 120mm Red
    12x BD-ROM
    Logitech X540 5.1 Surround
    2X Acer 23" LED - Eyefinity: 3840x1080
    Microsoft Sidewinder x4 KB

    "The significant problems we face cannot be solved at the same level of thinking we were at when we created them."
    - Albert Einstein

  2. #2
    Join Date
    Dec 2005
    Location
    Edmonton, AB, Canada
    Posts
    1,615
    Are you using XP (as your sig suggests) or Windows 7?

    I'm going to fool around with this today and let you know if I have any luck.
    Don't fear the penguin - www.slackware.com

  3. #3
    Join Date
    Jan 2004
    Location
    Here
    Posts
    10,474
    It is not the system in my sig. This is my media server running XP 64.
    8.1 Pro 64bit
    AMD FX 8350
    Asus Sabertooth 990FX R2.0
    24GB GSkill/Corsair 1866MHz
    2x XFX 6870 1GB
    SSD - OCZ V4 128GB/Kingston 120GB
    HDD - 3TB/2x 750GB/500GB/250GB
    Corsair TX850M
    Cooler Master HAF 932 Red
    CM Hyper 212 EVO w/2x SickleFlow 120mm Red
    12x BD-ROM
    Logitech X540 5.1 Surround
    2X Acer 23" LED - Eyefinity: 3840x1080
    Microsoft Sidewinder x4 KB

    "The significant problems we face cannot be solved at the same level of thinking we were at when we created them."
    - Albert Einstein

  4. #4
    Join Date
    Sep 2006
    Posts
    2,213
    I'd use a batch to create an HTML list of file types, then modify the resulting file by adding some HTML markup.

    I don't speak dos, but it seems a fairly simple task.

    You can read in a file line-by-line (the dir command results) and set that string to a value, then rewrite the string as:

    echo "<a href "string">string</a>"

    next line

    echo "



    I found a couple code blocks I was trying to figure out, the firs one creates the menu listing with path and file name,

    The second block adds a blank line. I was trying to figure out how to replace the blank line with some markup, like at least a line break.

    The third block is supposed to find/replace a string with a new string.


    dir *.pdf /-p /b /s /on >Menu.htm


    @ECHO OFF
    SET origfile=Menu.htm
    SET tempfile=temp.txt
    SET insertbefore=2

    FOR /F %%C IN ('FIND /C /V "" ^<%origfile%') DO SET totallines=%%C

    <%origfile% (FOR /L %%i IN (1,1,%totallines%) DO (
    SETLOCAL EnableDelayedExpansion
    SET /P L=
    IF %%i==%insertbefore% ECHO(
    ECHO(!L!
    ENDLOCAL
    )

    ) >%tempfile%
    COPY /Y %tempfile% %origfile% >NUL
    DEL %tempfile%



    @echo off
    REM -- Prepare the Command Processor --
    SETLOCAL ENABLEEXTENSIONS
    SETLOCAL DISABLEDELAYEDEXPANSION

    ::BatchSubstitude - parses a File line by line and replaces a substring"
    ::syntax: BatchSubstitude.bat OldStr NewStr File
    :: OldStr [in] - string to be replaced
    :: NewStr [in] - string to replace with
    :: File [in] - file to be parsed
    :$changed 20100115
    :$source http://www.dostips.com
    if "%~1"=="" findstr "^::" "%~f0"&GOTO:EOF
    for /f "tokens=1,* delims=]" %%A in ('"type %3|find /n /v """') do (
    set "line=%%B"
    if defined line (
    call set "line=echo.%%line:%~1=%~2%%"
    for /f "delims=" %%X in ('"echo."%%line%%""') do %%~X
    ) ELSE echo.
    )

  5. #5
    Join Date
    Sep 2006
    Posts
    2,213
    Never mind that stuff up there. This seems to almost work. It at least produces a text list of pdf files and a html file of links to those files.

    The only problem is that the visible link text just says "Link" for every file. I cannot figure out how to duplicate the file name in place of the Link text...

    Code:
    dir *.pdf /-p /b /s /on  >files.txt
    del Menu.htm
    
    echo "<a href=" >Menu.htm
    
    @echo off
    setlocal 
    set addtext=">Link</a><br><a href="
    for /f "delims=" %%a in (files.txt) do (echo/|set /p =%%a%addtext% & echo/) >>Menu.htm

  6. #6
    Join Date
    Sep 2006
    Posts
    2,213
    OK, this makes a slightly messy html menu, but it seems to work:

    Code:
    dir *.pdf /-p /b /s /on  >files.txt
    del Menu.htm
    
    echo "<a href=" >Menu.htm
    
    @echo off
    setlocal 
    set addtext1=">"
    set addtext2="</a><br><a href="
    for /f "delims=" %%a in (files.txt) do (echo/|set /p =%%a%addtext1% & echo/|set /p =%%a%addtext2% & echo/) >>Menu.htm
    You could play with the file types that it collects. I just had a lot of PDF files here to play with.

  7. #7
    Join Date
    Jan 2004
    Location
    Here
    Posts
    10,474
    Thanks CT. I will play around with it.

    I found this VBS script and it works fine, but when I try put multiple drive letters in "ParseName("D:\")" it comes up with an error. Need to figure out how to add multiple drive letters. And possibly add search terms (.iso .mkv .mp4).

    Code:
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(&H11&)
    Set objFolderItem = objFolder.ParseName("D:\")
    objFolderItem.InvokeVerb("find")
    8.1 Pro 64bit
    AMD FX 8350
    Asus Sabertooth 990FX R2.0
    24GB GSkill/Corsair 1866MHz
    2x XFX 6870 1GB
    SSD - OCZ V4 128GB/Kingston 120GB
    HDD - 3TB/2x 750GB/500GB/250GB
    Corsair TX850M
    Cooler Master HAF 932 Red
    CM Hyper 212 EVO w/2x SickleFlow 120mm Red
    12x BD-ROM
    Logitech X540 5.1 Surround
    2X Acer 23" LED - Eyefinity: 3840x1080
    Microsoft Sidewinder x4 KB

    "The significant problems we face cannot be solved at the same level of thinking we were at when we created them."
    - Albert Einstein

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •