Jump to content

Scanning for Files


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

Recommended Posts

Hello Forum,

I have an FM 9 Server with 8,5 Clients. (No "you should upgrade" messages please thank you)

I want to check in a directory in Windows if a file (whos name I know exactly) exists.

Can I do that? Do I absolutely need a file plugin for this?

In the end I want the server to execute this script.

If it can be done without a plugin please how, if it can only be done with a plugin, how do I do that server-side?

Thanks in advance

Link to comment
Share on other sites

Hey forum,

there were no takers for this question and I did some In depth research. There actually IS a way to do this!

You use the Import Script step to find out if a file exists. If the import script step leaves no error, it exists, if it causes an error, it does not exist.

Heres 3 Images of what it should look like exactly.

Note also the way the import is done into the temporary table which has only 6 number fields, is to ensure that table does not get filled with loads of rubbish just because an import happenned to work.

Works like a charm for me.

No guarantees are taken for this code, use at your own risk. :)

Best Wishes,

Spongebob

script_image1.jpg

script_image2.jpg

script_image3.jpg

Link to comment
Share on other sites

Getting this to run on the server will be the challenge. The server side scripts can only see into very specific folders on the server: the Documents folder inside the Data folder, and the temporary folder. There may be another folder but I cannot recall it just now.

You may need a robot machine running FMP to make this happen.

Link to comment
Share on other sites

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