Link to home
Start Free TrialLog in
Avatar of H4Inf
H4InfFlag for Australia

asked on

How to create folders from a CSV list of names?

Hi,

I need to create folders which are all contained in a CSV file. Then I would like to set permissions on them.

The CSV is laid out as:
Username,FullHomePath
eg. fred,\\files\staff\fred

I also want to create a Desktop and Documents folder in each folder.

I understand VBS & CMD a bit, but I have no idea how to incorporate the CSV file with this...

eg. With CMD, per user I would want to run:

if not exist "%NewFolder%" md "%NewFolder%"
if not exist "%NewFolder%\Desktop" md "%NewFolder%\Desktop"
if not exist "%NewFolder%\Documents" md "%NewFolder%\Documents"
cacls "%NewFolder%" /t /e /g ourdomain\%NewUser%:C
::Give Teachers Access
cacls "%NewFolder%" /t /e /g Staff:R

Just need some tips on incorporating my CSV list into this...

Cheers,

Paul.
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of H4Inf

ASKER

Thanks a lot!! :D

Best regards,

Paul.