As you can see from my script, I am creating a folder with the current date and then copying a folder to it.
I cannot get the script to create the folder within another folder, I have tried various things but none of them appear to work.
Here is the script -
tell application “Finder”
set the_date to current date
set the_year to year of the_date
set the_month to month of the_date
set the_day to day of the_date
set folder_name to “” & the_month & “-” & the_day & “-” & the_year
set destFolder to make new folder at disk “My Disk” with properties {name:folder_name}
duplicate folder “My Folder” of desktop to destFolder
end tell
Your script works for me and I cannot think of why it wouldn’t work for you. I created a folder at the desktop named “My folder”. Then I made a disk image at desktop (this doesn’t matter). I mounted the image file (whose name is “My Disk”). Ran your script and it created the folder within the disk image and also the folder “My Folder” Within theat folder. . The only thing I can thiknk might go wrong is the names.
Sorry couldn’t be of more help. At least you know that your script works.
I don’t think I made myself clear, the script works for me BUT…
I want the folder (with current date) to be created inside a sub folder and not on the top level of my disk and I can’t seem to get the syntax right :?
The copying of the dektop folder is no problem at all.