Jump to content

  •  

UPGRADE DEADLINE - SEPTEMBER 26, 2014!
FileMaker Inc. has a deadline for users of version 10,11, 12 as Individual box or volume licenses (with expired maintenance).
If you don't renew your maintenance and upgrade to FMP 13 you will no longer be eligible to upgrade, at the discount pricing.

Volume Licensing upgrade pricing for FileMaker Pro 13, FileMaker Pro 13 Advanced and FileMaker Server 13 will be discontinued.
Individual upgrade pricing for FileMaker Pro 13 and FileMaker Pro 13 Advanced will increase after September 26, 2014.
As of 27-September-2014, FileMaker 10 products will no longer be available for purchase or support.

http://help.filemaker.com/app/answers/detail/a_id/13865


Photo

Export txt file to network drive


  • Please log in to reply
4 replies to this topic

#1 ckai  ummmm

ckai
  • Members
  • 73 posts
  • FM Application:11 Advance
  • Platform:Mac OS X Snow Leopard
  • Time Online: 2d 22h 59m 9s

Posted 28 February 2012 - 05:21 PM

I've scoured the interweb globe for an answer to this but can't find anything that helps.

We have a Synology NAS that I would like to save a simple txt file file too. Basically, this file needs to be placed in a specific folder so another program can import the data. Obviously I can manually move the file once it's created on the desktop but thought it would be nice to have everything done for the user.

I don't know if it's my export path or the permissions on the drive or what. The folder on the drive I want to export too is mounted but I keep getting "helpful" errors saying it can't be done.

Basically, I want to know if a file can be exported to a drive like this and if so, what is the path I should be using?

I was thinking it would be easier to export the file onto the desktop then use Applescript to move the file to the right folder on the drive. Then I realised I didn't have a clue on how to right Applescript! I was thinking this option would actually avoid any issues I may have with permissions.

So any help would be rewarded with virtual beer/wine/whiskey whatever really :)
  • 0

#2 ckai  ummmm

ckai
  • Members
  • 73 posts
  • FM Application:11 Advance
  • Platform:Mac OS X Snow Leopard
  • Time Online: 2d 22h 59m 9s

Posted 28 February 2012 - 07:31 PM

I decided to do some more self-taught programming and did some research regarding Applescript. I finally got there in the end, creating a script that copies the file over then deletes it off the desktop.

It is annoying I have to use Applescript so if anyone can shed some light of network paths etc, I'd love to just keep it Filemaker.
  • 0

#3 brian rich  aging apprentice

brian rich
  • Members
  • 287 posts
  • LocationHampshire, England
  • FM Application:11 Advance
  • Platform:Cross Platform
  • Skill Level:Expert
  • Time Online: 11d 3h 10m 58s

Posted 29 February 2012 - 03:32 AM

You could use a plug-in such as Base Elements to move the file. It then becomes a few script steps in Filemaker:

set variable [$pathFrom; value ("source path")]
set variable [$pathTo; value ("destination path")]
set variable [$result; value (BE_MoveFile($pathFrom;$pathTo)]

If you want to get the correct path information, set up a temporary script to use the BE_SelectFile function. This opens a file dialog for you, and passes back the path to any file that you click on in the dialog.

http://www.goya.com....elements/plugin

The plug-in is open source and is free.

HTH

Brian
  • 0
Brian

#4 comment  consultant

comment
  • Members
  • 24,199 posts
  • Time Online: 329d 16h 10m 7s

Posted 29 February 2012 - 08:04 AM

Basically, I want to know if a file can be exported to a drive like this and if so, what is the path I should be using?


I don't know, but it should be easy to find out. Insert any file residing on the drive into a container field as reference only, then look at GetAsText ( ContainerField ). That should show the paths (relative and absolute), in the syntax you need to use.
  • 0

#5 ckai  ummmm

ckai
  • Members
  • 73 posts
  • FM Application:11 Advance
  • Platform:Mac OS X Snow Leopard
  • Time Online: 2d 22h 59m 9s

Posted 29 February 2012 - 11:55 AM

You could use a plug-in such as Base Elements to move the file. It then becomes a few script steps in Filemaker:

set variable [$pathFrom; value ("source path")]
set variable [$pathTo; value ("destination path")]
set variable [$result; value (BE_MoveFile($pathFrom;$pathTo)]

If you want to get the correct path information, set up a temporary script to use the BE_SelectFile function. This opens a file dialog for you, and passes back the path to any file that you click on in the dialog.

http://www.goya.com....elements/plugin

The plug-in is open source and is free.

HTH

Brian


Thanks Brian, that plugin has some useful stuff which I'm going to look in to.

I don't know, but it should be easy to find out. Insert any file residing on the drive into a container field as reference only, then look at GetAsText ( ContainerField ). That should show the paths (relative and absolute), in the syntax you need to use.


Good little trick that comment, and as a result, I've now got it all sorted. Thanks heaps. I thought I was putting in the right path but obviously I had something extra in there.

And no I know how to (kinda) write Applescript so it's a win-win :)
  • 0




FMForum Advertisers