Hello,
still new here so I hope i came to the right place.
I would like to automatically create empty folders from a csv file
But I ran into a
my code only generates a folder for the last row in the csv file....
any help is much appreciated
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 30 18:56:27 2021
@author: [email protected]
code automatisch mapstructuur aan te maken op basis van een .csv bestand
incomplete -- incompleet -- incomplete --
creeert alleen de laatste folder
"""
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
still new here so I hope i came to the right place.
I would like to automatically create empty folders from a csv file
But I ran into a

any help is much appreciated
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 30 18:56:27 2021
@author: [email protected]
code automatisch mapstructuur aan te maken op basis van een .csv bestand
incomplete -- incompleet -- incomplete --
creeert alleen de laatste folder
"""
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import os import csv #path= 'X:\\Medewerkers\\mkool\\00 ALGEMEEN' path= 'D:\\Documents\\MARCEL\BIM, CAD & GIS\\PY_SCRIPTS' f= open('D:\\Documents\\MARCEL\BIM, CAD & GIS\\PY_SCRIPTS\\name.csv') #f= open('X:\\Medewerkers\\mkool\\00 ALGEMEEN\\map1.csv') csv_f = csv.reader(f) #lets see what we have for row in csv_f: print (row) os.chdir(path) #os.chdir(path) #for i in range(1,11): #row= (Newfolders) Newfolders= str(row) os.makedirs(Newfolders)
Larz60+ write Dec-20-2021, 09:56 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode togs on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode togs on future posts.