Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi all,

 

I need help. I am willing to pay someone who can build the script.

 

I need a script that will work on Mac / PC that will generate a nested directory folder set from the records in my database. The nested directory folder set can reside on a users desktop after the script is finished executing for now.

 

The records that are used for the directory folder names are related in a parent child arrangement in filemaker - so the hierarchy for these records exists. Each record will contain a text field that is to be used as the label for each directory folder created.

 

I think the solution lies in AppleScript and VB Script. I do not have the capability of making those either. I would be very grateful if someone could get this working for me.

 

Attached is a screenshot of dummy data so you can get a sample of what I need the script to generate.

 

Thanks,
David

 

Edited to include the attachment.

post-94242-0-30217500-1426175702_thumb.p

Posted

Here is a link that covers some AppleScript to create folders. http://fmforums.com/forum/topic/79232-using-applescript-in-fm-pro-10-on-mac-os-x-to-create-a-folder/

 

Here is a link to create folders on Windows. https://fmrift.wordpress.com/2010/02/03/creating-a-folder-from-filemaker-windows/

 

See if that helps get you started.

 

You write a script to test for the OS version, and perform whichever task you need.

Posted
The records that are used for the directory folder names are related in a parent child arrangement in filemaker - so the hierarchy for these records exists. Each record will contain a text field that is to be used as the label for each directory folder created.

 

Your screenshot does not disclose the structure of your file. You need more than a label in order to create a folder: you need to have the entire path to the folder - for example, "root/vehicle/car/ford/sedan". It's not clear from your question whether you already have this (or can get it easily) or not. In fact, it's not clear what is the exact problem here: getting the paths or the task of creating the folders from the given paths..

Posted

Hi Comment,

 

Apologies for not being clear. What I have so far:

 

Database Structure:

One table, "Category Type"; second table, "Category". Category Type is related to 1 or more Category(s).

 

Category Type is recursive to provide the hierarchical structuring of Category Type(s). Likewise, Category is recursive to provide the hierarchical structuring of Category(s). I anticipate this will provide the ability to generate a text file of: the leaf node, the intermediary nodes, and the root node for 1 category.

 

The directory folder structure will use the values from "Category", not "Category Type".

 

What I don't have:

1. The method of generating the text path. I thought I would create a calculation that would display the path from child node up through its lineage to the root. I think that is within my capabilities, but maybe it requires more than that. I was thinking this would be a calculated field in the "Category" table.

 

2. The method of collecting all path information (the calculated field result in "Category" table) that emanate from a particular node selected as the "starting point". To clarify, if given a tree with a hundred nodes, distributed among 5 levels; a user may select a node somewhere in the middle as the point in which they want directory folders created from that point down. This would exclude the nodes that are sibling to the node they selected, and by default exclude the sibling nodes as well.

 

Once all path information collected, either export to a text-only file for AppleScript or VBscript to process its contents; or maybe it should be held in a temp field, cache within Filemaker to prevent the need of creating a text-only document on user workstation for Applescript or VB script to act on?

 

3. The method of generating the directory folder structure from the paths collected by step 2 above. I thought using Applescript for Mac environment, and VBscript for the PC environment to make the directory folders was appropriate - maybe not.

 

Thanks!

Posted

Hi Josh, I see I forgot to thank you for your contribution… thanks!

This topic is 3538 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.