Skip to content

Commit ee5ba69

Browse files
authored
Toplu Dosya Silme Programı
1 parent 88335a1 commit ee5ba69

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: toplu_dosya_silme.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818
if kabul == "y" or kabul == "Y":
1919
for i in dosyalar:
2020
if i.endswith(dosya_turu):
21-
os.system("rm -r {}".format(i))
21+
if os.name == "posix":
22+
os.system("rm -r {}".format(i))
23+
elif os.name == "nt":
24+
os.system("del /f {}".format(i))
2225
sayi += 1
2326
else:
2427
pass
2528
print("Toplamda {} {} uzantılı dosya silindi\n".format(sayi, dosya_turu))
2629
if sayi == 0:
2730
print("Klasörde bu uzantıya sahip herhangi bir dosya bulunamadı.\n")
2831
else:
29-
print("Programdan Çıkıldı!")
32+
print("Programdan Çıkıldı!")

0 commit comments

Comments
 (0)