Jump to content

File List from Share (windows)


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

Recommended Posts

I am working on solving an issue that requires me to list all of the files in a share.  I am hoping to use a command like :

ListAllFilesInDirectory( $Path ) 

But I am running in to issues.

My FileMaker server is running on a windows server and I can not for the life of me get it to list the files from the share. 

I have tired \\Computer name\Share Name, filewin:\\Computer name\share name, I have tried mapping the share to a drive letter, and even creating a symbolic link to the share. The drive letter and link both work from file explorer or terminal, but I can not get it to work with the "ListAllFilesInDirectory( $Path )". 

Any help would be greatly appreciated. 

Thank you!

-=fred=-

Link to comment
Share on other sites

I don't use the 360works plugins so can't tell you which script commands to use.

The problem you're (most likely) encountering is that both your server desktop and terminal are running in the userspace of the user your logged in as. Filemaker server doesn't run in that userspace. Therefore the driveletters (and credentials) that you use in your userspace are not available to filemaker server.

To make this work, you first have to connect to the remote shares with valid credentials from the script environment when the script is running. So basically you need to run a 360works plugin script step that will allow you to either invoke the net use command or invoke a command shell that allows you to invoke the net use command.

Net use \\Server\share\ F: password /user:username

Then you should be able to access the share and get a listing. I think send event should also work, though I usually use BaseElements for stuff like this.

Link to comment
Share on other sites

Hello,

Thank you, OlgereDiekstra, for sharing that insight about the userspace.

ScriptMaster includes a function, RunShellScript, that could allow you to connect to the remote Share through the script if the userspace context/authentication is the issue.

However, to diagnose the reason ListAllFilesInDirectory is not working, could you please reproduce the issue, then locate the log file generated by our plugin, and attach that to this thread? You can reference our docs at the link below to locate the log file.

http://docs.360works.com/index.php/Plugin_log_files

Link to comment
Share on other sites

I also tried the RunShellScript and got the same results. I then tried using a batch script before the script ran and again it did not work. 

 

So for now I have the batch script dumping the file list to a text file that I am importing in to my solution and getting the names from that.

Thank you for looking in to this!

360Plug-ins_Server.log 360Works_ScriptMaster_Server.log

Link to comment
Share on other sites

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