VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. I have a text file exported from the movie collectorz program and I want to add my DVD collection to xbmc through stub files. I found this code and modified it to give me the files.


    Code:
    for /f "tokens=*" %%l in (aaa.txt) do echo %%l > "%%l.dvd.disc"
    now Im realizing I want to create a directory named from the list and place the created file into that directory. also I want to add the xml into the file -

    Code:
    <discstub>
      <message>%moviename% is located in the DVD rack</message>
    </discstub>

    where "moviename" is taken from the aaa.txt file this is way beyond my tiny brains ability so I need help....LMAO

    the text file looks like this...

    The Adjustment Bureau (2010)
    Alien (1979)
    Aliens (1986)
    Alien³ (1992)
    Alien:_Resurrection (1997)
    Alien Vs. Predator (2004)
    Aliens Vs Predator - Requiem (2007)
    Apollo 18 (2011)
    Avatar (Extended_Cut) (2010)
    Back To The Future (1985)
    Back To The Future II (1989)
    Back To The Future III (1990)


    and I want to end up with...


    a Dir named "The Adjustment Bureau (2010)" with a file named "The Adjustment Bureau (2010).DVD.Disc" in it and the file to contain the xml code from above with "The Adjustment Bureau (2010)" as the moviename.


    I have spent hours trying different things and all have failed (and failed well I might add...LOL) I have almost 3,000 DVDS and would hate to have to do this by hand. and I'm sure others could use something similar

    is a bat file the best thing to use? would vbs be better? anyone know of a program that will do this? any help or thoughts welcome.
    Quote Quote  
  2. OK I got a working set of scripts. the first one makes the files and the second one creates a folder from the filename and moves the file into it.

    Im running into one problem, some of the movies contain an ":" which screws that filename up. I've tried putting a ^ in front of the colon in the text file but this don't help. is there a way to replace it or parse it or clean it in the script?
    Quote Quote  
  3. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Ask in the newsgroup news://alt.msdos.batch.nt, which you can access via Google if you don't have a usenet account:
    http://groups.google.com/group/alt.msdos.batch.nt/topics

    It's illegal to have a colon in filename, so you'd want to convert or filter it out.
    Quote Quote  
  4. Okay i have a important question...
    im creating a generator for text file code
    i want to create a batch file that can create another batch file, this isn't the problem though.
    by looking at the code below you can clearly see that this isn't a problem.

    echo @echo off >> %Name%.txt
    echo if not exist "C:\%directoryname%" start "%~dp0\file.vbs" >> %Name%.txt

    ^^^^^ current directory | ^^^^^ sends to text file

    as you can see here the current directory command is (%~dp0) but when i send it to the text file it displays the actual directory.
    for example ("%~dp0\file.vbs" >> %Name%.txt) displays in a text file named (%Name%.txt) on my current pc this...

    ("C:\Users\Zask\Desktop\gen\\file.vbs")

    i don't want it to display the actual directory into the text file but instead the original command (%~dp0).
    i cant find the solution on the internet and i cant escape the special characters with the carrot sign "^" because the code that i'm sending into
    the text file is'nt vbs script. is there a way around this?

    emphasized::
    in the text file this is what i would like it to display~

    @echo off
    if not exist "C:\%directoryname%" start "%~dp0\file.vbs" >> %Name%.txt

    not this~

    @echo off
    if not exist "C:\%directoryname%" start "C:\Users\Zask\Desktop\gen\\file.vbs" >> %Name%.txt


    thank u for the help
    Quote Quote  
  5. instead of
    "%~dp0\file.vbs"
    use
    "%%~dp0file.vbs"
    that extra % would escape that % and also %~dp0 ends with \ so it does not have to be included
    Quote Quote  
  6. thank you so very much
    Quote Quote  



Similar Threads