0

I would like to ask how to use csc.exe with file2clip.cs in command line because I could not figure it out how to place arguments as paths for the file. The C# code copy the file onto clipboard and needs argument for the selected file path. I have no idea what syntax I need to use after the C# file to specify argument with the path.

How to copy/cut a file (not the contents) to the clipboard in Windows on the command line?

csc.exe file2clip.cs {c:\IFRToolLog.txt} 

sent error message ->

error CS2001: Source file '(c:\IFRToolLog.txt)' could not be found
Andras
  • 9
  • 2
  • Please show your full command line and make clear where input ends and output begins. Just copy your console's contents into a code block. – CodeCaster Nov 24 '21 at 22:13
  • Why do you append `{c:\IFRToolLog.txt}`? – CodeCaster Nov 24 '21 at 23:03
  • The c# code copy the file onto clipboard, but having no experience using csc.exe I have no idea what syntax I need to specify the argument for the file path. – Andras Nov 24 '21 at 23:41
  • 2
    You can also just download the exe. You're mixing up compiling the executable and running it. – CodeCaster Nov 24 '21 at 23:47
  • Thanks for the quick reply. I have no experience how to use csc.exe but I expected we can use as .exe with arguments. – Andras Nov 25 '21 at 00:02
  • Does `TYPE thefile.txt | clip.exe` do what you want? – lit Nov 25 '21 at 00:43

0 Answers0