ckai Posted February 29, 2012 Posted February 29, 2012 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 :)
ckai Posted February 29, 2012 Author Posted February 29, 2012 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.
brian rich Posted February 29, 2012 Posted February 29, 2012 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
comment Posted February 29, 2012 Posted February 29, 2012 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.
ckai Posted February 29, 2012 Author Posted February 29, 2012 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 :)
Recommended Posts
This topic is 4649 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