Output text file End of File Error 62

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dlbuller
    New Member
    • Sep 2009
    • 4

    Output text file End of File Error 62

    Hi, I apologize if this question has been asked already. I have searched with no luck. I am trying to output a specifically formatted text file and then change the extension to another program type:

    outputting .txt changing to .dva (DVDAuthorGUI cue file).

    The .txt output format looks the same as a DVDAuthorGUI created file, but when I try to open the file in DVDAuthroGUI, I get an END OF FILE Error 62. I must be missing something in my code... Here is what I have:

    Code:
    string text = "DVDAuthorGUI 1.017 - 2/16/2009\n" +
                   "C:\\Documents and Settings\\Administrator\\Desktop\\hey.mpg\n" +                               
                   "C:\\Documents and Settings\\Administrator\\Desktop\\trial.mpg\n" +                 
                   "C:\\Documents and Settings\\Administrator\\Desktop\\trial1.mpg\n" +
                   "***\n" +
                   "00:00:00.00\n" +
                   "00:00:00.00\n" +
                   "00:00:00.00\n" +
                   "***\n" +
                   "0\n" +
                   "0\n" +
                   "0\n" +
                   "***\n" +
                   "***\n" +
                   "***\n" +
                   "***\n" +
                   "***\n" +
                   "***\n" +
                   "<none>\n" +
                   "<none>\n" +
                   "<none>\n" +
                   "***\n" +
                             "center,bottom,60,60,30,30,28.0,arial.ttf,720,478,29.97,ISO-8859-1,FFFFFF:A0A0A0:808080|\n" +
                               "center,bottom,60,60,30,30,28.0,arial.ttf,720,478,29.97,ISO-8859-1,FFFFFF:A0A0A0:808080|\n" +
                               "center,bottom,60,60,30,30,28.0,arial.ttf,720,478,29.97,ISO-8859-1,FFFFFF:A0A0A0:808080|\n" +
                    "***\n" +
                    "<default>\n" +
                    "NTSC\n" +
                    "True\n" +
                    "False\n";
                
    System.IO.File.WriteAllText(@"C:\Documents and Settings\Administrator\Desktop\trial.dva", text);
    Thank you for any help you can give me.

    Dan
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    The .txt output format looks the same as a DVDAuthorGUI created file,
    Looks the same... Using what program to read it? If the file contains some non-text characters, binary data etc and you are trying to read it with a simple text editor then those non-text items are most likely getting stripped away.

    Personally I would write a little routine to read the source file as a stream of bytes and then compare a 'real' file to one of your manufactured files byte by byte.

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.

      Comment

      • dlbuller
        New Member
        • Sep 2009
        • 4

        #4
        Yeah, I was using a simple text editor to compare the files. Hmm, i don't think I would know how to do your suggestion but I will look into it. Thank you. Thanks for the tip too.

        Comment

        • liquid217
          New Member
          • Sep 2009
          • 2

          #5
          If you could send me your sample dva file, I can debug it for you. My email address in on DVDAuthorGUI's Homepage.

          Comment

          • dlbuller
            New Member
            • Sep 2009
            • 4

            #6
            Thanks! I'll do that, I appreciate it!

            Comment

            • liquid217
              New Member
              • Sep 2009
              • 2

              #7
              Actually, I was just looking over what you had written. You probably need to send an \r\n, instead of just \n. If this doesn't help you, again, feel free to email your sample file.

              Comment

              • dlbuller
                New Member
                • Sep 2009
                • 4

                #8
                wow, i feel dumb! Thanks a lot! That worked great!!!

                Comment

                Working...