Printing to a file problem

This is a discussion on Printing to a file problem within the C Programming forums, part of the General Programming Boards category; I'm trying to print to a file, to make a batch file, and I need the \t to be ignored: ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    5

    Angry Printing to a file problem

    I'm trying to print to a file, to make a batch file, and I need the \t to be ignored:

    infile = fopen("atline.bat", "w");
    fprintf(infile,"net use y: \\\TWPC-BELL-DC01\\c$\n");
    fprintf(infile,"y:\n");
    fprintf(infile,"at %d:%d y:\\securedox\\send\\fileprep 1 1\n", hour, min);
    fprintf(infile,"net use y: /d");
    fclose(infile);

    The output I'm getting in the file is

    net use y: \ WPC-BELL-DC01\c$
    y:
    at 11:31 y:\securedox\send\fileprep 1 1
    net use y: /d

    Notice the big TAB in my net use! I cant for the life of me remember how to get my \t to print as \t. Thanks for any help!

    Sarah
    Last edited by neva4getme; 10-11-2001 at 10:40 AM.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    5

    Talking I figured it out

    I needed 4 \'s Duh!

    Sarah

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 01:44 PM
  2. File Writing Problem
    By polskash in forum C Programming
    Replies: 3
    Last Post: 02-13-2009, 10:47 AM
  3. Problem reading file
    By coder_009 in forum C Programming
    Replies: 10
    Last Post: 01-15-2008, 01:22 PM
  4. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 05:14 AM
  5. Replies: 3
    Last Post: 03-04-2005, 02:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21