Jump to content

Script to import FMP records with variable File Names


Recommended Posts

  • Newbies

 

I'm trying to write a script to import records from a secondary FMP database. 

Each FMP file to import will have it's own unique name, but will have the same prefix  eg. ImportFile_230525.fmp12

Is there a way of scripting a wild card filename......like import any file in a specified folder that begins with "ImportFile_23" ?

Any advice would be greatly appreciated. 

thanks

Link to comment
Share on other sites

In theory, if the folder in question is inside the Documents folder, you could use the Get ( DocumentsPathListing ) function to get a list of the files in the folder. However, in practice, this would be both slow and cumbersome.

A better way would be to use either AppleScript (on macOS) or a plugin (e.g. the free BaseElements) to get the list.

Once you have the list, your script can loop over it and import each file in turn.

 

Link to comment
Share on other sites

  • Newbies

all my files will be saved on a server, rather than my local drive. But I'll download BaseElements and see if that helps..

 

thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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