jestermgee Posted February 18, 2010 Share Posted February 18, 2010 I only create scripts when I have a need to do so and I have not needed to create a script for a while now but am looking into one that I can offer the XBMC community. The script that I want to look at creating will generate a NFO file (xml text file) with the filename of a video file. In that file would be the basics of the file name. For example: This show - 01x01 - Pilot Episode.avi What I want to do is create the file: This show - 01x01 - Pilot Episode.nfo Then in this file I want to extract the bits of the file name to fill the relevent fields: <episodedetails> <title>Pilot Episode</title> <season>01</season> <episode>01</episode> </episodedetails> I am completely stuck. As a start I know I can create a loop to use FindFileFirst and FindFileNext to read the file names byt I can't figure out how to get this file name and create another file based off it and fill in the details. My initial thought was to create a temp directory and create a blank text file, then write the lines within the test file then move the file into the video directory and change the extension while moving but it's a bit out of my depth of expertese. Any help to get me started would be great. There are other things I need to get in this but I am sure I can figure those out. Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now