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.
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:for /f "tokens=*" %%l in (aaa.txt) do echo %%l > "%%l.dvd.disc"
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.
+ Reply to Thread
Results 1 to 6 of 6
-
-
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? -
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. -
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 -
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
Similar Threads
-
Adding a text logo to a video file without re-saving it to another file?
By coxanhvn in forum EditingReplies: 4Last Post: 19th Dec 2008, 15:03 -
How to create subtitle file from transcript text file
By amagrace in forum SubtitleReplies: 7Last Post: 8th May 2008, 11:44 -
Audio files now show as "Winamp Media File" in file type
By tmh in forum AudioReplies: 3Last Post: 7th Jan 2008, 13:25 -
VIDEO TS Directory to a divx file...
By JustSomeGuy in forum Video ConversionReplies: 1Last Post: 6th Dec 2007, 14:10 -
C# code to save text from listbox to a text file -- SOLVED--
By freebird73717 in forum ProgrammingReplies: 2Last Post: 2nd Sep 2007, 15:50