I have a script that builds home folders from a text document. Several of you had input on this and it works well.
set namedoc to do shell script “cat "” & (POSIX path of file “OS X Server:staffnames.txt”) & “"”
set fold to “/Volumes/OS X Server/homes/”
repeat with i from 1 to number of paragraphs in namedoc
set this_item to paragraph i of namedoc
if this_item is “end” then exit repeat
do shell script “mkdir "” & fold & this_item & “"”
end repeat
display dialog “Done!”
The only problem is if it finds a folder already created, it stops and doesn’t go on.
How do I put a check in to see if the folder exists and only make it if necessary, skip it if its there? I don’t want to overwrite users data by forcing fresh folders down everytime I need to add 5-10 users.
thanks, I know you all will find a way!