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?
            Asked
            
        
        
            Active
            
        
            Viewed 306 times
        
    0
            
            
        - 
                    What have you tried? Some code examples would be fine, so we can see what exactly might be wrong with your code. – Vasil Dininski Apr 30 '19 at 15:12
1 Answers
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
