simbax

pliki1.py

Dec 30th, 2012
6,446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. # coding=utf-8
  2. from os import *
  3. import fnmatch
  4. sciezka_glowna = raw_input("Podaj ścieżkę bezwzględną do katalogu: ")
  5. co = raw_input("Podaj nazwę, którą chcesz znaleźć: ")
  6. print "Szukam..."
  7. for sciezka, podkatalogi, pliki in walk(sciezka_glowna):
  8.     lista = [x for x in listdir(sciezka) if fnmatch.fnmatch(x, co)]
  9.     if lista != []:
  10.         print 'W katalogu %s znaleziono pliki:\n\n%s\n\n' % (sciezka, str(lista))
Advertisement
Add Comment
Please, Sign In to add comment