Найти - Пользователи
Полная версия: как в windows удалить файл с атрибутом read-only?
Начало » Python для экспертов » как в windows удалить файл с атрибутом read-only?
1
utyf
read-only имеется ввиду тот, что explorer показывает в properties. Пробовал os.chmod, но не помогло. Я так понял, что chmod изменяет permissions. Спасибо.
slivlen

import os, stat

os.chmod('your_ro_file', stat.S_IWRITE) # Снять ro
os.chmod('your_rw_file', stat.S_IREAD) # Вернуть ro
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB