0

I'm trying to make a code in c# that prints all file directories in my computer, and I'm almost there. But a problem exists:

When a folder name is just a space (" ") the process goes into an infinite loop. What do you advise me to do, without changing the folders name or ignoring that?

Keatinge
  • 4,330
  • 6
  • 25
  • 44
  • 3
    It is so very hard to guess without seeing your recursion code. – dotNET May 30 '16 at 02:00
  • Sounds like you have a bug that is caused by your own code. Edit your post and include the relevant part of your code. – Ladi May 30 '16 at 02:54
  • 1
    Post your code. There is already existing api in .net that can do this. [See Directory.GetDirectories method](https://msdn.microsoft.com/en-us/library/ms143314(v=vs.110).aspx) – Bon Macalindong May 30 '16 at 03:39
  • Thanks everyone. I fixed the problem. I added "\" to the end of all folder directories and it solved my problem. – Mohammadreza Rezaei May 30 '16 at 16:41

0 Answers0