Creating a unique folder and getting its name

Hi,

In this script below i can create a new folder with a specific number wich
is unique every time, as you will see i drop the folder somewhere and it will be triggered
with a action folder, The only problem is that i do not know how to make this
unique folder in a variable so i can put the files in it by this script.

i am in for any help

thanks in advantage

on run
	tell application "Finder"
		activate
		display dialog "Enter Order nummer" with icon caution �
			default answer ""
		copy the result to myReSult
		if the button returned of myReSult is "OK" then
			set propertie to the text returned of myReSult
			make new folder at folder "uit" of desktop with properties �
				{name:the text returned of myReSult} ---- wich is a order number
			tell application "Finder"
				set myHD to name of startup disk
				set myWatchedFolder to folder (myHD & ":Email:")
				move items of folder (myHD & ":Email:") to folder "Dolf HD:Desktop Folder:uit:---a number"
			end tell
		end if
	end tell
end run

Does this work?

on run
	tell application "Finder"
		activate
		set myReSult to (display dialog "Enter Order nummer" with icon caution ¬
			default answer "")
		if the button returned of myReSult is "OK" then
			set propertie to the text returned of myReSult
			set new_fol to (make new folder at folder "uit" of desktop with properties ¬
				{name:the text returned of myReSult}) ---- wich is a order number 
			set myHD to name of startup disk
			set myWatchedFolder to folder (myHD & ":Email:")
			move items of folder myWatchedFolder to new_fol
		end if
	end tell
end run

– Rob

Thanks Rob for the quick response

it works until a error says…

"cannot change (folder “Email” of startup disk) into a item

Dolf

How 'bout this?

on run
	tell application "Finder"
		activate
		set myReSult to (display dialog "Enter Order nummer" with icon caution ¬
			default answer "")
		if the button returned of myReSult is "OK" then
			set propertie to the text returned of myReSult
			set new_fol to (make new folder at folder "uit" of desktop with properties ¬
				{name:the text returned of myReSult}) ---- which is a order number 
			set myHD to name of startup disk
			set myWatchedFolder to (myHD & ":Email:")
			move items of folder myWatchedFolder to new_fol
		end if
	end tell
end run

– Rob

Thanks again Rob,

Now it works !!! This will be a great help.

Dolf