Get a file to move

Hi people

I have this code and for some reason it will not work.
can any one tell me why?

property tempFolder : "Temp Folder"

tell application "Finder"
	set folder1 to choose folder with prompt "Choose source folder of files to convert:"
	set folder2 to choose folder with prompt "Choose destination folder:"
	if folder1 = folder2 then
		display dialog "The source and destination folders must be different.
Please select another destination folder."
		set folder2 to choose folder with prompt "Choose destination folder:"
	end if
	set Folder1Contents to list folder folder1 as string without invisibles
	set Fpath to folder1 as string
	set pathFolder2 to folder2 as string
	if not (exists folder tempFolder of folder2) then
		make new folder at folder2 with properties {name:tempFolder}
	end if
	set the TempPath to folder tempFolder of folder folder2 as alias
	
	set ItemList to list folder TempPath without invisibles
	repeat with z from 1 to number of items in the ItemList
		set thefile to item z of the ItemList as string
		set the thefile to the file thefile of the folder TempPath as alias
		move file thefile to folder pathFolder2
	end repeat
end tell

I would do something like:

tell application "Finder"
	set sourcefolder to choose folder with prompt "Choose source folder of files to convert:"
	set destinationfolder to choose folder with prompt "Choose destination folder:"
	if sourcefolder = destinationfolder then
		display dialog "The source and destination folders must be different. Please select another destination folder."
		set destinationfolder to choose folder with prompt "Choose destination folder:"
	end if
	move every item of sourcefolder to destinationfolder
end tell

I don’t understand what you want to do with the temp folder…

This is a part of a longer script.
What I want it to do is to take a folder containing freehand files - Export all the pages of each file to the TempFolder - rename all files acording to a list it go from the freehand file and move them to the containing folder.
the temp folder is just for the rename part for each file exported.