Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #-*- coding:utf-8 -*-
- import os
- import base64
- def ayristir(path):
- dirList=os.listdir(path)
- dirList.sort()
- fnames = []
- dnames = []
- for fname in dirList:
- if os.path.isdir(path + fname):
- dnames.append(fname)
- if os.path.isfile(path + fname):
- fnames.append(fname)
- return dnames,fnames
- (klasorler,dosyalar) = ayristir("//home//siyah//Desktop//Veriler//")
- for item in klasorler:
- print("Dizin => " + item)
- for item in dosyalar:
- os.chdir("//home//siyah//Desktop//Veriler//")
- data = open(item, "r").read()
- decoded = base64.b64decode(data)
- gm = str((decoded))
- print(gm)
- kayit = open("data.txt" , "wb")
- kayit.write(gm)
- kayit.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement