ic ic

ic ic

  • NA
  • 85
  • 0

C# - Create TXT file & then execute cmd batch that copies the file to printer

Feb 12 2010 7:15 AM

Good day, I need help.
I have a print button that loops through a grid object and where it finds the print check it must do the following.
1. Create a text file on the network with object text & values in.
2. When file created then executed dos cmd to copy file to printer:  eg: network root - P: copy text.txt to \\ip\
3. On second line overwrite txt file with new values.
Please help, no clue (beginner)
 
private void btnReprint_Click(object sender, EventArgs e)
{
oID.Rewind();
if (oID.DefaultView.Count > 0)
{
do
{
Overwirie existing file with new text
1. Create txt
2. Excute dos cammand
 

}
}
while (oID.MoveNext());
}

}

 

Answers (1)