Has something changed with Applescript from 10.4.2-10.4.3

In the past the kind people here helped me develop a script to create home folders with a documents folder within, it ran fine. I just tried it under 10.4.3 and I get several junk folders I never saw before. The script is below:

set file_path to choose file with prompt "Choose the text file:"
set name_doc to do shell script "cat " & quoted form of POSIX path of file_path
set folder_path2 to choose folder with prompt "Choose the home folders' folder:"
set folder_path to POSIX path of folder_path2

repeat with this_par in paragraphs in name_doc
	if this_par is "end" then exit repeat
	do shell script "mkdir -p " & quoted form of (folder_path & this_par & "/Documents")
	end repeat
	set thePath to folder_path & this_par & "/Documents"
	set homepath to folder_path & this_par
	set theOwner to this_par
	set theScript to "chown -R " & theOwner & " " & quoted form of (homepath)
	do shell script theScript with administrator privileges
end repeat

display dialog "Done!"

I want to go back and rerun the script now to add an additional folder to the home folder withour removing anything, I thought I had the syntax correct, anyone have any idea what is wrong? THe script runs and comes back ok however I get several odd folders not in the user list when it runs. I kept the user list at 3 names for testing and got 9 home folders for some reason.

Thanks.

Smuth;

When you post script for others to try, please use the AppleScript button to put bbcode before and after it. That makes getting it into our Script Editors only one click away, instead of a cut and paste job.

Thanks;

Adam

set file_path to choose file with prompt "Choose the text file:"
set name_doc to do shell script "cat " & quoted form of POSIX path of file_path
set folder_path2 to choose folder with prompt "Choose the home folders' folder:"
set folder_path to POSIX path of folder_path2
repeat with this_par in paragraphs in name_doc
    if this_par is "end" then exit repeat
    do shell script "mkdir -p " & quoted form of (folder_path & this_par & "/Documents")
    end repeat
    set thePath to folder_path & this_par & "/Documents"
    set homepath to folder_path & this_par
    set theOwner to this_par
    set theScript to "chown -R " & theOwner & " " & quoted form of (homepath)
    do shell script theScript with administrator privileges
end repeat
display dialog "Done!"

This what you mean? I’ve seen so many here that were cut and paste I didn’t know, I tried to use the markup app but couldn’t get it right.

You’ve got it right in the leading post. The directions are here

I’m surprised it compiles for you. As posted it has one “repeat with” and two “end repeat” statements.

Because I edited it.

Note: In Safari, the buttons on the “post” page will just add the BBCode/smilie to the end of the entry. You’ll have to put it in the correct place manually.