dbTalk Databases Forums  

Variable export file name

comp.databases.filemaker comp.databases.filemaker


Discuss Variable export file name in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bignoel
 
Posts: n/a

Default Variable export file name - 06-30-2005 , 05:58 PM






Hi Yall,
I have a little problem that I'm seeking assistance with.

I'm trying to export email addresses in lots of 50 with each batch
having a unique name eg emaillist_01, emaillist_02 etc.

I've worked out the count and lap loops so the script will gather 50
addresses and export them, reset the count and increment the lap variable.

Now the hard part is the variable file name.

All I can see in the export facility is that you get to point to a file
or designate a file within the script.

Any ideas will land you on my Xmas kind thoughts list.

Bignoel

Reply With Quote
  #2  
Old   
Dan
 
Posts: n/a

Default Re: Variable export file name - 06-30-2005 , 06:10 PM






Hello Bignoel,


I'm afraid there is no native solution. You have to export the file and then
rename it and for this you need either a plug-in which will do file operations,
like renaming, or you need to run an operating system script to rename the
files.

Quote:
Hi Yall,
I have a little problem that I'm seeking assistance with.
I'm trying to export email addresses in lots of 50 with each batch
having a unique name eg emaillist_01, emaillist_02 etc.

I've worked out the count and lap loops so the script will gather 50
addresses and export them, reset the count and increment the lap
variable.

Now the hard part is the variable file name.

All I can see in the export facility is that you get to point to a
file or designate a file within the script.

Any ideas will land you on my Xmas kind thoughts list.

Bignoel





Reply With Quote
  #3  
Old   
Matt Wills
 
Posts: n/a

Default Re: Variable export file name - 06-30-2005 , 06:56 PM



You need to look at either a plugin to do dynamic export, such as oAzium
FileTools from http://www.onestopfilemaker.com or File from
http://www.troi.com, or whatever scripting you can do with your OS.

If you're on a Mac, for instance, you can use a calculation field to
generate an AppleScript that will rename the file after it has been
exported.


Matt



Bignoel wrote:

Quote:
Hi Yall,
I have a little problem that I'm seeking assistance with.

I'm trying to export email addresses in lots of 50 with each batch having
a unique name eg emaillist_01, emaillist_02 etc.

I've worked out the count and lap loops so the script will gather 50
addresses and export them, reset the count and increment the lap variable.

Now the hard part is the variable file name.

All I can see in the export facility is that you get to point to a file or
designate a file within the script.

Any ideas will land you on my Xmas kind thoughts list.

Bignoel

Reply With Quote
  #4  
Old   
Bignoel
 
Posts: n/a

Default Re: Variable export file name - 06-30-2005 , 07:17 PM



Dan wrote:
Quote:
Hello Bignoel,


I'm afraid there is no native solution. You have to export the file and
then rename it and for this you need either a plug-in which will do file
operations, like renaming, or you need to run an operating system script
to rename the files.
Ahhhhhh So close yet so far. Maybe V8 will have this option.
Ta
Bignoel


Reply With Quote
  #5  
Old   
Dan
 
Posts: n/a

Default Re: Variable export file name - 06-30-2005 , 07:54 PM



Hello Bignoel,

All is not completely lost, there are the commercial plug-ins that Matt Wills
has pointed out and if you are happy to "get your hands dirty" with the command
line there is a free plug in called shell which allows you to call the command
line. You will find it at

http://www.abstrakt.com/shell.html

Very simple to use. Read the abstrakt website to get some idea of its uses.

Quote:
Dan wrote:

Hello Bignoel,

I'm afraid there is no native solution. You have to export the file
and then rename it and for this you need either a plug-in which will
do file operations, like renaming, or you need to run an operating
system script to rename the files.

Ahhhhhh So close yet so far. Maybe V8 will have this option.
Ta
Bignoel




Reply With Quote
  #6  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Variable export file name - 06-30-2005 , 08:51 PM



Matt Wills wrote:
Quote:
You need to look at either a plugin to do dynamic export, such as oAzium
FileTools from http://www.onestopfilemaker.com or File from
http://www.troi.com, or whatever scripting you can do with your OS.

If you're on a Mac, for instance, you can use a calculation field to
generate an AppleScript that will rename the file after it has been
exported.
And if you're on Windows, you can use a calculation to set up for a Send
Message scipt step that wil lrename the file after being exported.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #7  
Old   
Wondering
 
Posts: n/a

Default Re: Variable export file name - 07-04-2005 , 11:27 AM



I would export the entire file out as a temporary text file with 1 email per
line
and after ever 50 email insert a "marker line".
Just sume kind of "*******- marker-************"

like this
line 47 jfjdshqf (AT) jhfdsq (DOT) com
line 48 jfhhdjsqhfjk (AT) ljhgf (DOT) net
line 49 iuhfqhsd (AT) uygf (DOT) com
line 50 iuhdiuqs-qdsf (AT) lklk (DOT) net
"*******- marker-************"
line 51 fkjqfkjdqs (AT) lgfd (DOT) com
line 52 hjgqdsgf (AT) hgfds (DOT) fr
etc

Then when all the data has been exported to a temp text file
run a vbscript (via the "Open URL" script step) that
reads (loops) through the file line by line
storing the emails into a text variable with a line return after each one
and
each time it reads the marker line
it creates a file with a new name derived from the loop variable and writes
the text variable into it.


Well that's what I'd do.
That way
FM doesn't have to handle the file name variables (which causes the problem
in the first place) and
you wouldn't have worry about synchronisation between FM and a series of
scripts that depend on the OS.


Don



"Bignoel" <bignoel (AT) myplace (DOT) net.au> a écrit dans le message de news:
42c4745c$1 (AT) quokka (DOT) wn.com.au...
Quote:
Hi Yall,
I have a little problem that I'm seeking assistance with.

I'm trying to export email addresses in lots of 50 with each batch having
a unique name eg emaillist_01, emaillist_02 etc.

I've worked out the count and lap loops so the script will gather 50
addresses and export them, reset the count and increment the lap variable.

Now the hard part is the variable file name.

All I can see in the export facility is that you get to point to a file or
designate a file within the script.

Any ideas will land you on my Xmas kind thoughts list.

Bignoel



Reply With Quote
  #8  
Old   
Matt Wills
 
Posts: n/a

Default Re: Variable export file name - 07-04-2005 , 12:47 PM



The list would have to be created in a global field, because straight
exporting won't insert any sort of marker. You'll need counter:

Set Field [ g.Field ; ""]
Go To Record [First]
Loop
Set Field [g.Field ; g.Field & EMail & "P" //The P is a return
Set Field [Counter ; Counter +1]
If [Counter = 50
Set Field [g.Field ; g.Field & "***Marker***P" //So is that one
Set Field [Counter ; 0 ]
End If
Go To Record [Next ; Exit after last]
End Loop

Then you can export just that one field to the predetermined filename.

Matt


Wondering wrote:

Quote:
I would export the entire file out as a temporary text file with 1 email
per line
and after ever 50 email insert a "marker line".
Just sume kind of "*******- marker-************"

like this
line 47 jfjdshqf (AT) jhfdsq (DOT) com
line 48 jfhhdjsqhfjk (AT) ljhgf (DOT) net
line 49 iuhfqhsd (AT) uygf (DOT) com
line 50 iuhdiuqs-qdsf (AT) lklk (DOT) net
"*******- marker-************"
line 51 fkjqfkjdqs (AT) lgfd (DOT) com
line 52 hjgqdsgf (AT) hgfds (DOT) fr
etc

Then when all the data has been exported to a temp text file
run a vbscript (via the "Open URL" script step) that
reads (loops) through the file line by line
storing the emails into a text variable with a line return after each one
and
each time it reads the marker line
it creates a file with a new name derived from the loop variable and
writes the text variable into it.


Well that's what I'd do.
That way
FM doesn't have to handle the file name variables (which causes the
problem in the first place) and
you wouldn't have worry about synchronisation between FM and a series of
scripts that depend on the OS.


Don



"Bignoel" <bignoel (AT) myplace (DOT) net.au> a icrit dans le message de news:
42c4745c$1 (AT) quokka (DOT) wn.com.au...
Hi Yall,
I have a little problem that I'm seeking assistance with.

I'm trying to export email addresses in lots of 50 with each batch having
a unique name eg emaillist_01, emaillist_02 etc.

I've worked out the count and lap loops so the script will gather 50
addresses and export them, reset the count and increment the lap variable.

Now the hard part is the variable file name.

All I can see in the export facility is that you get to point to a file or
designate a file within the script.

Any ideas will land you on my Xmas kind thoughts list.

Bignoel

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.