I'm starting to learn visual basic. I'm using 2008 VB express. I'm using the online help that came with the program, but its not as detailed as I would like.
I'm currently trying to make a command line code that does something like this:
C:Tv Shows\Stargate\Season 1\XXXXS01E09.mkv
C:Tv Shows\House\Season 5\XXXXXS05E02.mkv
I need to program to read the initial directory to figure out what tv show directory to place the file, then I need the program to read the file name to figure out which season folder directory to place it in. It should also verify the season folder exist, and if it doesn't create it.
I'm use to coding in batch, although I'm not the greatest. There aren't very many commands for batch, but for VB there seems to be a zillion. The online guide isn't the greatest for showing me what does what. I'm starting to get confused fast, without know what does what. I've been look at example codes a lot.
Module Module1 Sub Main() Read = File.OpenText(“C:\tv.txt”) While Read.Peek <> -1 LineIn = Read.ReadLine() End While Read.Close() End Sub End Module
Will that working in pulling tv shows, line by line from a txt file?
Also should I put a for command before the end while, which executes a sub that will resolve the directory, season, and tv show? then move it before it loops back to figure out the next line of the tv.txt file?
I can't even figure out how to make the program "ECHO" the lines of the file back to me to make sure its reading correctly.
This post has been edited by syeo: 29 November 2009 - 02:29 PM