Anasayfa / Etiket Arşivi: folder

Etiket Arşivi: folder

Python Windows SetFileAttributesW folder subfolder files

import os import ctypes FILE_ATTRIBUTE_READONLY = 0x01 FILE_ATTRIBUTE_HIDDEN = 0x02 FILE_ATTRIBUTE_SYSTEM = 0x04 FILE_ATTRIBUTE_DIRECTORY = 0x10 FILE_ATTRIBUTE_ARCHIVE = 0x20 FILE_ATTRIBUTE_NORMAL = 0x80 FILE_ATTRIBUTE_TEMPORARY = 0x0100 def set_attribute_single(path_or_file, attr_name): ret = ctypes.windll.kernel32.SetFileAttributesW(path_or_file, attr_name) if ret: print(path_or_file,' ok') else: # return code of zero indicates failure -- raise a Windows error raise …

Devamını Oku »

Folder List – Dosya Listesi Folder/subfolder file list batch windows

Folder/Subfolder/filelist Yeni bir metin belgesi açtıktan sonra dir *.* /b /s >> filelist.txt kodu yapıştırın daha sonra liste.bat olarak işlemi hangi klasörde yapacaksanız o klasöre kaydedin daha sonra çalıştırdınızda D:\FOLDER\SUB\0001 D:\FOLDER\SUB\0002 D:\FOLDER\SUB\0003 D:\FOLDER\SUB\0004 D:\FOLDER\SUB\0001\0001-1.jpg D:\FOLDER\SUB\0001\0001-2.jpg D:\FOLDER\SUB\0001\0001-k1.jpg D:\FOLDER\SUB\0001\0001-k2.jpg D:\FOLDER\SUB\0002\0002-1.jpg D:\FOLDER\SUB\0002\0002-2.jpg D:\FOLDER\SUB\0002\0002-k1.jpg D:\FOLDER\SUB\0002\0002-k2.jpg D:\FOLDER\SUB\0003\0003-1.jpg D:\FOLDER\SUB\0003\0003-2.jpg D:\FOLDER\SUB\0003\0003-k1.jpg D:\FOLDER\SUB\0003\0003-k2.jpg böylelikle bulunduğu klasördeki tüm ana …

Devamını Oku »