Hi,
I am trying to get a list of database connections stored in the folder, the script runs successfully but it gives wrong results!
For example, "inFolder=r'C:\1\test'" has only one database connection which is u'C:\\1\\test\\Urbab.sde', but when I run the script it displays it 9 times every time! I tried to run the script from the python window in the ArcMap and I also used PyScripter and both of them gives the same result.

<SPAN class="keyword token">import</SPAN> arcpy<SPAN class="punctuation token">,</SPAN> sys<SPAN class="punctuation token">,</SPAN> os
inFolder<SPAN class="operator token">=</SPAN>r<SPAN class="string token">'C:\1\test'</SPAN>
outFolder<SPAN class="operator token">=</SPAN>r<SPAN class="string token">'C:\1\test2'</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">"Connecting to geodatabase"</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>workspace<SPAN class="operator token">=</SPAN>inFolder
arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>overwriteOutput<SPAN class="operator token">=</SPAN><SPAN class="token boolean">True</SPAN>
<SPAN class="keyword token">for</SPAN> DBConn <SPAN class="keyword token">in</SPAN> inFolder<SPAN class="punctuation token">:</SPAN>
x<SPAN class="operator token">=</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>ListWorkspaces<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"*"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"SDE"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN> x
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
What might be the issue here?
Thanks,
Ahmad