0

I am working with OpenCV-Python, and I want to save captured pictures into DateTime stamp folders. Each file was created with incremental numbers, so I want to create date-time stamp folders then save created files in it. How can I solve this problem?

Konrul
  • 3
  • 1

1 Answers1

0

The method for getting the date last modified is mentioned here

How to get file creation & modification date/times in Python?

One thing to be mid-full of is that you format the datetime without any forbidden chars for the platform you are using.

You may also want to have a list of files, create a set of directories and create them upfront, rather than doing creating them while iterating over the files.

ds4940
  • 3,382
  • 1
  • 13
  • 20
  • I have found the answer at here: https://stackoverflow.com/questions/7923453/create-dir-with-datetime-name-and-subfiles-within-directory-python/55942714#55942714 – Konrul May 01 '19 at 21:33