Question
Python help: I have a bunch of files, inside each file is a date (2012/03/22) I need to write a code that creates a directory
Python help: I have a bunch of files, inside each file is a date (2012/03/22) I need to write a code that creates a directory for the year-month, and day in the file. and then moves the files into the proper folder. so the end result would be inside the 2012 folder, inside the 03 folders, inside the 22 folders. is the file that contains 2012/03/22.
all while only using the os. module to list the dirs, move files, join paths etc
all of this should be done through functions and only using functions. also while making it portable to other computers. i have done this by making a basepath function to be stored as a variable with the base path being c:/user/username/python files/data to sort
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started