Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

CopyMoveFile ( ~OriginalFilePath ; ~EndFilePath ; ~MacServerPath ; ~PCServerPath ; ~MoveOrCopy )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.0  (3 votes)
  Discuss this Custom Function

Reeve Schragger, White Studio
http://www.whitestudio.net.au

Move or Copy a file in Finder or Explorer using CMD or Terminal commands

Sample Input:
CopyMoveFile (
"X:/MainFolder/Subfolder/File.pdf" ;
"X:/MainFolder/NewFolder/FileCopied.pdf" ;
"/Volumes/DataServer/" ;
"X:/" ;
"C" ;
)
Sample Output:
do shell script "cp " & quoted form of "/Volumes/DataServer/MainFolder/Subfolder/File.pdf" & " " & quoted form of "/Volumes/DataServer/MainFolder/NewFolder/FileCopied.pdf"


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

In my work I move lots of files around for printing and sometimes need to switch between platforms. I was sick of using my separate custom functions for doing this and having to re-program.
Now I can use 1 custom function. I can make a variable and pass it to BOTH an Applescript AND a Send Event step and, regardless of the platform, I will have a correctly formatted terminal command to run in the script step that works on that platform.

The only bit that is not obvious is the "~MacServerPath ; ~PCServerPath ;".
You will have "different" beginnings to a Mac and Windows address for the same file. For example;
Mac: "/Volumes/DataServer/MainFolder/Subfolder/File.pdf"
Win: "X:/MainFolder/Subfolder/File.pdf"

Therefore I use the substitute command where I would (in this case) replace "/Volumes/DataServer/" with "x:/" were I going onto a PC but the path was formed on the Mac (and the opposite).
90% of the time this step is unnecessary so I just put " 1 ; 1 ;" in there if the solution is a single platform job and it cancels itself out.

PS. This is my first upload, any constructive criticism would be appreciated

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it

Discuss:

There are no comments yet. Be the first to post a comment about this Custom Function! Please try to keep it brief & to the point. Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 9 + 2 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. TimeFormatAsText ( theTime )
  (Mon, Nov 13, 1:59pm)
2. ParseWebValueList( text )
  (Thu, Nov 02, 9:52am)
3. SVG_HTML_to_Text ( _svg_text ; _orig_text ;
  (Wed, Oct 25, 4:17am)
4. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
5. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
6. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
7. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
8. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)

RSS Feed of Custom Functions