I don't like l as variable name (looks too much like number one), so I changed it a little:
for fn in os.listdir("C:/Bilder"):
print fn # test
if fnmatch.fnmatch(fn, 'IMG*'):
fn = fn.replace(fn, "HH")
"""my result -->
Hello, thank you for your answer. I did not expalin exactly what I wanted to do in this little code-snippet.
I actually want to rename all files in the directory "C:\\Bilder" with the name IMG to HH.
But the example you showed me did not do that.
Is it possible for you to show me how to do that?
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...