folder name help

i am writing an installer program with applescript studio, and the way the installer determines where files are installed is that the files are placed in folders, and the name of the folder that the file is in is the path that the file will be installed to. i want to make a script that gets the name of each folder in a certain location, and moves every file in each folder to the location stated in the folder’s name. i can’t figure out how to do this, though. can anyone help me out?

nvm, i fixed the problem. :rolleyes: