Skip to content

Commit fc4ff0a

Browse files
Merge pull request avinashkranjan#361 from Bug-007/last
Last
2 parents f75976c + 7239d69 commit fc4ff0a

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

Last Access/Last Access.png

65.1 KB
Loading

Last Access/Last Access.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import os
2+
import time
3+
from os import listdir
4+
from os.path import isfile, join
5+
print("ENTER THE PATH TO FOLDER")
6+
path = input()
7+
files_list = [f for f in listdir(path) if isfile(join(path, f))]
8+
for k in files_list:
9+
print(k)
10+
access_time = os.path.getatime(path +"\\" + k)
11+
local_time = time.ctime(access_time)
12+
print("Last access time(Local time):", local_time)

Last Access/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Last Access
2+
3+
It prints out when was the last the file in folder was accessed.
4+
5+
## Setup instructions
6+
7+
Just run the script and Enter the path of folder
8+
And press Enter
9+
10+
## Output
11+
12+
![Last Access](/Last%20Access/Last%20Access.png)
13+
14+
## Author(s)
15+
16+
Vijay Chaurasia
17+

0 commit comments

Comments
 (0)