Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 03:45 AM
Here is the error message ( '/dev/adhoc/' is the folder path containing notebooks):
FileNotFoundError: [Errno 2] No such file or directory: '/dev/adhoc/'
Here is the code I am using:
%python
import os
from datetime import datetime
path = '/dev/adhoc/'
# path = '/dbfs/'
fdpaths = [path+"/"+fd for fd in os.listdir(path)]
print(" file_path " + " create_date " + " modified_date ")
for fdpath in fdpaths:
statinfo = os.stat(fdpath)
create_date = datetime.fromtimestamp(statinfo.st_ctime)
modified_date = datetime.fromtimestamp(statinfo.st_mtime)
print(fdpath, create_date, modified_date)