Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Creating import file for dsimportexport from FileMaker Pro
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating import file for dsimportexport from FileMaker Pro

>Hi there,
>In order to be able to easily import my users in a new server, I set up
>a FileMaker database to enter my users informations, so that I can
>easily export infos as a text file using a nice formula.
>Therefore, after I enter my user's information, I end up with this :
>0x0D 0x5C 0x3A 0x2C dsRecTypeStandard:Users 10
>dsAttrTypeStandard:RecordName dsAttrTypeStandard:AuthMethod
>dsAttrTypeStandard:Password dsAttrTypeStandard:UniqueID
>dsAttrTypeStandard:PrimaryGroupID  dsAttrTypeStandard:Comment
>dsAttrTypeStandard:RealName dsAttrTypeStandard:NFSHomeDirectory
>dsAttrTypeStandard:UserShell dsAttrTypeStandard:HomeDirectory
>url><path>firstname surname</path></home_dir>:
>Two lines, so far, so good. I can copy this result and paste it in
>TextEdit, then save it and upload it on my server with dsimportexport
>with no trouble. Very nice.
>However, issues come when I want to import multiple users. I would like
>to automate the whole process. So, the idea would be to create a FMP
>script or Applescript which would be able to generate a text file with
>the necessary informations.
>If I choose to export the file as text only, I encounter a big issue :
>FMP only export as tab or comma delimited file, but I need to export as
>a Return delimited file. If I export a single record, there seems to be
>some extra characters that dsimportexport does not seem to like. If I
>try to use cut and paste of info in Terminal with pico, using GUI
>Scripting, pico does not like the paste of Mac OS X and add more
>carrier returns. Not good.
>So, what would be the best way to do this, except using cut and paste
>to create ± 200 users ? Does anyone know a FMP plug-in to export in
>text file many records using carrier return instead of tabs ? I would
>be able to generate this using Text-Edit, but I'd like to avoid too
>much hacking there...
>I will take into account any suggestion :-)
>Thanks !

Hi Gil,

I use FMP to create all of my dsimportexport files (I actually use WGM to
import, but it's the same file.)  I have a calculation field that pulls
all of the appropriate other fields together.  I export that one field,
setting the export format to tab-separated text, and the don't format
output option is set in the specify field order dialog.  Once the file is
generated, I then manually copy in the header at the top of the file using
BBEdit Lite.

The trick that I found was that the end of line characters needs to be
changed from Mac to Unix to work.  This might be what you're seeing.
BBEdit Lite will allow this change, or you can do the following perl

 perl -pi -e 's/\r/\n/g' <filename>

(from macosxhints:

Other gui-based text editors might do it too, I don't know, since I have
an older copy of BBEdit Lite that does the job for me, I haven't looked.

I think you'll find that these tips will help.

I'm sure I could (and probably will eventually) write an applescript that
will run after the main export occurs out of FMP to prepend the header and
do the eol convert, but for now, and since I don't do it that often,
manual intervention is okay for me to finish up the process.


Sean Kaiser
Apple Certified Technical Coordinator
Systems Integration
Northmont City Schools

Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.