Jump to content
Server Maintenance This Week. ×

Automate file import script with timer


This topic is 2437 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have a folder in which files are downloaded on a regular basis every 5 minutes. I need to import these files automatically into filemaker table (existing) with a script that automatically runs every 5 minutes.  Once the file in imported then the file needs to be moved to a "Archive" subfolder. Filenames will vary, but never duplicate.  Files are text tab delimited.

 

Here is the path of the files: /Users/unsername/documents/download/

I know that I can import multiple files with the menu.  However again, this needs to run automatically every 5 minutes.

Thank you for any help you can give.

 

I am using Filemaker pro Advance 15

 

image.png.5a576f5015ecfb6db71d0dbc1d21cffa.png

 

Link to comment
Share on other sites

38 minutes ago, teamhyp said:

However again, this needs to run automatically every 5 minutes.

Are you a single user? If yes, will you be working with the solution while all this takes place?

 

38 minutes ago, teamhyp said:

Once the file in imported then the file needs to be moved to a "Archive" subfolder.

Filemaker can't do this natively without the help of a plugin or OS-level scripting*. 

---
(*) Please update your profile to reflect your version and OS. 

Link to comment
Share on other sites

  • Newbies

Yes, single user.  Profile updated. I can maybe use applescript to detect new file and launch the filemakerscript then use apple script again to move the file?

Link to comment
Share on other sites

  • Newbies

I still need a script to load files without knowing their names.  So I need a script to basically upload the whole folder worth of files every 5 min.

Link to comment
Share on other sites

You can make a script to import whatever is in the folder at that time. And if you're using AppleScript to watch the folder and call the FileMaker script, then you don't need to do it every 5 minutes (although you could, if you so prefer). 

Alternatively, you could have the AppleScript write the file names to a global field and have the FileMaker script take it from there.

What is the mechanism that adds the files to the folder? The one thing that worries me is the possibility of a file being added while you import. 

Link to comment
Share on other sites

This topic is 2437 days old. Please don't post here. Open a new topic instead.

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.