Is there any method or tool that list existing named pipes in a Windows box?
Asked
Active
Viewed 7,142 times
2 Answers
5
C#:
String[] listOfPipes = System.IO.Directory.GetFiles(@"\\.\pipe\");
edit: Warning!
This approach may fail and throw an exception if any existing pipe name contains characters that are illegal for use in file names. Pipe names are less restrictive than file names, so it is possible that some pipe may have a strange name and cause this exception.

dss539
- 6,804
- 2
- 34
- 64

Omar Elsherif
- 259
- 2
- 2
-
2it didn't work for me. It tried to list all files in a folder named `.\pipe` relative to the current path and as this folder doesn't exists it threw an exception – Jader Dias Nov 18 '10 at 00:09
-
3Thank you so much for the Warning part! We were using this approach for a while and suddenly it failed on my machine. I had no idea what happened. Turns out Google Drive created a pipe named "C:\Users\somethingsomething" which caused that. – Pavel Tupitsyn Feb 28 '14 at 06:47