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

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

Recommended Posts

  • Newbies
Posted

FM 6 would default to *.usr when using export script in runtime solution

Now you are offered tab as the first option and have to scroll to the last selection before you are offered usr. potentially confusing for users. is there any way of forcing usr to be offered.also would be nice to create automatic backup on desktop unfortuantley filemaker does not let you specify desktop current user as option. I suppose vb scripting might do it but that is beyond me!

there are some commercial solutions (like fm exporter, but these are expensive and my solution is free, users donate to charity

any help would be great

Posted

Why don't you script the whole export? That way you can hard code the format and the location. Then use a simple one-line command line to move the file from the hard coded location to where you want it to be.

  • Newbies
Posted

thankyou I know hard to hard script for instance to C:/backup.usr

not sure how you can then make filemaker send a command to copy this to desktop

sorry to be thick

Posted

In a filemaker Send Message (or Send Event in 7) script step, add the following text to be sent:

cmd /c move /y c:backup.usr %userprofile%desktopmyFile.usr

This will move (and if you want, rename) the file to the current user's desktop.

Note that this whole syntax can be calculated in a field or through a script if you need it to be dynamic. The source of the Send Event can either be hard coded text like above or taken from the value of a field.

Breakdown of the syntax:

'cmd /c' calls the Windows command interpreter and tells it to quit when the command is done. For best results, uncheck the 'bring target application to the foreground' option in the Send Event script step. This will make sure the black 'dos' box does not come to the foreground while the command is being executed.

'move /y' explains itself. The 'y' switch is to automatically answers yes to overwrite an existing file on the desktop if there is one

'%userprofile%' is a Windows environment variable that holds the path to where the user's settings and special folders are, including the desktop.

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