Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8394843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:09:26+00:00 2026-06-09T20:09:26+00:00

I got this program written in C# WinForms. im using system.diagnostic to create a

  • 0

I got this program written in C# WinForms.

im using system.diagnostic to create a CMD process.
with that cmd i want some arguments but they are not present or working :S
dont know why ?!

NOTE: im not sure how to use more than 1 argument, correct me if im wrong 😀
im trying to replicate the “copy /b %filename% lpt1” command….

here is my code:

    public void OutputBtn_Process_Click(object sender, EventArgs e)
    {
        foreach (FileInfo fi in listBox1.Items)
        {
            Process process1 = new Process();
            process1.StartInfo.UseShellExecute = false;
            process1.StartInfo.Arguments = "copy /b myfile.txt test.txt";
            //process1.StartInfo.LoadUserProfile = true;
            process1.StartInfo.FileName = "cmd.exe";
            process1.StartInfo.WorkingDirectory = Path.GetDirectoryName(fi.FullName);
            process1.Start();
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:09:27+00:00Added an answer on June 9, 2026 at 8:09 pm

    Try this

     process1.StartInfo.Arguments = "/C \"copy /b myfile.txt LPT1:\""; 
    

    The documentation on Windows 7 command-line tool cmd.exe

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a newbie and I know that this C program which I got somewhere
I have written a program in c, that do some calculations then creates a
If I want to compile a program that is written in Ada, I have
I got a program (written in python) who starts several processes. Now I want
I got this error Unhandled exception at 0x0049b946 in Program.exe: 0xC0000005: Access violation reading
While compiling a program in Java I got this big WARNING warning: [unchecked] unchecked
I'm new to C programming and I just came across this program and got
I got a C# program which opens a EventWaitHandle like this to get triggered
So, I've got this code I'm trying to update. It was written for visual
I have got a DLL and a program, both written with Delphi 2007. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.