This question already has answers here:
How do I get the list of open file handles by process in C#?
(7 answers)
Closed 7 years ago.
Is there a way to get List of Files or FileName which a Process is writing (if possible writing/reading/appending) ,from C# ,which means im talking about Windows (NT,Vista,XP,7).
see here: How do I get the list of open file handles by process in C#?
Related
This question already has answers here:
Open file with associated application
(3 answers)
Closed 5 years ago.
I have a string of the file path and I want to open the file. Not in the way that it shows bytes in the console for example, but to open the original file with the program that suits him.
For example if my path shows a .docs file I want it to be opened with Word.
Any suggestions?
System.Diagnostics.Process.Start("CMD.exe",filePath);
This question already has answers here:
Windows file associations done properly?
(1 answer)
How to associate a file extension to the current executable in C#
(9 answers)
Closed 6 years ago.
I have a windows form application made in c#, and I want to set a file extension (.txt for example) to open automactily with my application and my icon instead of the NotePad. How can I do it?
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Open file with associated application
I want to open a file in it respective application, e.g. open function of windows.
Same thing can be done in java with the help of Desktop class where you pass the file name and the respective file is opened.
But no idea how to do in C#.
System.Diagnostics.Process.Start("filename.doc");
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to shell execute a file in C#?
How can i run an execute file in c# (by command line)?
and in addition, I want to save the output and see it on the screen?
See the System.Diagnostics.Process class. See MSDN.
You use the StadardOutput (and optionally StandardError) to get the output and put it at the screen any way you want.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How do I retrieve disk information in C#?
hi dudes.
I wanna a code in c# 2010 which gets the free space of the drive.
you can use DriveInfo and use the property TotalFreeSpace