filedate
๐
๐
๐
Description Simple, convenient and cross-platform file date changing library.
๐ฅ
Requirements Programs:
Python >= 3.5
๐
Modules:
dateutil
- String date times conversion todatetime.datetime
objects๐
๐ฅ๏ธ
Installation git
(recommended)
git clone https://github.com/kubinka0505/filedate
cd filedate/Files
python setup.py install
python -m pip install filedate
๐
Usage import filedate
File_Date = filedate.File("~/Documents/File.txt")
# Get file date
File_Date.get()
# Set file date
File_Date.set(
created = "01.01.2000 12:00",
modified = "3:30PM 2001/02/02",
accessed = "3rd March 2002 20:00:30"
)
โ
Keeping files dates import filedate
from pathlib import Path
# Get all files in directory (recursive!)
Files = [str(File.resolve()) for File in Path(".").glob("**/*")]
#---#
# Initialize `Keep` object
Dates = filedate.Utils.Keep(Files)
#---#
Dates.hold()
# ... Do your stuff ...
#
# from os import *
# for File in Files:
# File_Out = path.splitext(File)[0] + ".mp4"
# system(f'ffmpeg -i "{File}" "{File_Out}" -y')
Dates.drop()