spongebob Posted March 5, 2008 Posted March 5, 2008 Hi, I use FM Server 9 under Windows 2003 Server with FM 8.5 clients under Windows XP. I want to use functionality in a script to rename and copy files in the windows environment. I know I can do this with the troi file plugin. Question is; that means I must install the plugin for every client yes? Is there a way to rename and copy files reliably under windows that does not require me to use a plugin so I dont need to install it on all the clients? Can a custom function do this? (I understand those are shared between all clients yes?) Thanks
Mikhail Edoshin Posted March 5, 2008 Posted March 5, 2008 You can automatically download and update client plug-ins from server. This requires a bit of coding, i.e. you should use special functions provided by the AutoUpdate plug-in (included) to see if you have a new version on the server, then get it and install. Under Windows you can also use shell commands to work with files with the Send Event script. E.g. "cmd /C move " & fullPathToSource & " " & fullPathToTarget. This is harder than using a special plug-in, because to have solid code you should check for errors and the only way you can do this is to redirect output and error into files (using code like "1>output.log 2>error.log"), then import these files and see if the operation was successful. Doable, but I myself would prefer a plug-in.
Wim Decorte Posted April 24, 2008 Posted April 24, 2008 Absolutely. You can use the Send Event script step to execute Windows CLI commands. For renaming: cmd /c ren someFile.ext renamedFile.ext You can string commands together with the & and && symbols and catch errors by use the or symbol ("|") and piping the output to a text file. If you have FM waiting in a pause you can then import that text file to handle the error. All of this is much easier with plugins though. And as mentioned you can push plugins down to the clients automatically with the FileMaker Server functionality.
Chris Dragon Posted May 9, 2008 Posted May 9, 2008 You could try the free SaveIT plugin available here: http://www.cnsplug-ins.com/products.htm?product=saveit Also, Gap_Filler will be including a file manipulation function soon in its $30 utility package: http://www.dracoventions.com/products/fm/ The function is actually already there but requires you to set something to make it visible (I'm still testing it). Send me a support request if you'd like to try it.
Recommended Posts
This topic is 6110 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 accountSign in
Already have an account? Sign in here.
Sign In Now