Jump to content
Server Maintenance This Week. ×

Scan files in a folder


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

Recommended Posts

Hi,

 

I had a filemaker application that used to scan a batch of csv files as imported data into tables that further analyses the data. Since the filenames change everytime, and since there are quite a few, I don't want to manually enter every filepath that needs to be imported.

 

The application still works well, but to get the input (that is generated by another program, not filemaker), I had to first create a "list.bat" file that would generate a filepaths list in the other program's output directory, simply to create a list of the csv files that filemaker must analyse, among other files.  (one single command line was used: dir > list.txt or something like that.) Then, I could copy the path of only the created "list.txt" file into the filemaker app, which then could know which files to get input from, and trigger a script.

 

However, I now have problems getting newest versions of Windows accept working with this simple ".bat" file... there is a security blocking everything.... so I simply wonder if there is a way, directly in filemaker, to get a list of filepaths contained in a folder, and make my old app work again by itself.

 

Thanks!

 

Link to comment
Share on other sites

Hi

 

You cannot do this natively in FileMaker but you can using the free Scriptmaster file from 360Works.

http://www.360works.com/scriptmaster/

 

Select the module "List All Files In Directory"

 

You then have 3 choices...

 

1) Register the function with ScriptMaster. Register the module on startup of the Scriptmaster file, then in your main database call the Scriptmaster file on startup. The function will then show under the Scriptmaster plugin in External Functions

 

2) Paste the module code into your solution. Copy the code that the Scriptmaster file gives you. Then set a variable in your database startup script set to the code you copied from Scriptmaster. Doing it this way does not require you to open the Scriptmaster file on startup. Again, the external function will be available to you then.

 

3) Register for the advanced version of Scriptmaster (currently $95/year) This will allow you to generate your own plugin that you can call to list the files in the directory.

 

HTH

 

Ed

Link to comment
Share on other sites

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