Create csv directory if it doesn't exist
This commit is contained in:
parent
dacfdaeef6
commit
855fb52c65
@ -24,6 +24,10 @@ def moveCSVfiles():
|
||||
# todo: Find out why Twint doesn save to absolute path and remove the need for this step
|
||||
files = os.listdir(current_folder_path)
|
||||
destfolder = os.path.join(current_folder_path,csv_foldername)
|
||||
|
||||
if not os.path.isdir(destfolder):
|
||||
os.path.mkdir(destfolder)
|
||||
|
||||
for f in files:
|
||||
if (f.endswith('.csv')):
|
||||
shutil.move(os.path.join(current_folder_path,f), os.path.join(destfolder,f))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user