Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

where's all the real applescript forums?

Featured Replies

That is a question i would like answered if you know of them, but i couldn't find one in the last 7 min, so i figured i'd ask you guys if you know of any and go ahead and ask my non-FM-Related applescript question.

DISCLAIMER: I know zero about applescripting, i usually just hit record, do what i need it to do and hit stop.

I'm running a script that copies files from one drive to another, it will run every night (at 2:00 am). no prob there. But after the first run, it now stops with the dialog box "Would you like to overwrite, blah blah blah," message. When i do my trusty "record" action, it doesn't record me saying "yes, overwrite all them old files" it just sits there until i come in the next morning and hit No, b/c it would take to long and screw everything up. Please advise. Probably (hopefully) simple.

Jeremy

I would use the duplicate with replacing command as follows:

duplicate(file "file name" of folder "folder name" of "drive name")to folder "destination folder name" of "drive name" with replacing

This should work for you.

  • Author

i get the following error:

"A Replacing:true can't go after this disk Back Up"

this is my current code:

code:


tell application "Finder"

activate

select folder "FileMaker Pro 5 Unlimited"

open selection

select folder "All of the Accounts go in here" of folder "FileMaker Pro 5 Unlimited"

open selection

select every item of container window of folder "All of the Accounts go in here" of folder "FileMaker Pro 5 Unlimited"

copy selection to folder "All of the accounts go in here" of folder "FileMaker Pro 5 Unlimited" of disk "Back Up"

select folder "Web" of folder "FileMaker Pro 5 Unlimited"

open selection

select every item of container window of folder "Web" of folder "FileMaker Pro 5 Unlimited"

copy selection to folder "Web" of folder "FileMaker Pro 5 Unlimited" of disk "Back Up"

end tell


Any ideas?

Jeremy

Sometimes parentheses will un-confuse Applescripts:

copy selection to (folder "All of the accounts go in here" of folder "FileMaker Pro 5 Unlimited" of disk "Back Up") with replacing

Or, it may be that the "replacing" option doesn't work with a multi-file copy. You could set up a loop to copy them individually, or...

If you are always overwriting the contents of the backup folder anyway, why not just delete all the contents first before doing the copy. Something like:

delete every item of folder "All of the accounts go in here" of folder "FileMaker Pro 5 Unlimited" of disk "Back Up"

Be very careful with this one though.

  • Author

hmmm, Interesting suggestion about the deleting. If the parentheses dont work i'll test that a few times and i'm sure that would work.

Thanks

Jeremy

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.