Sort a file permanently 
Author Message
 Sort a file permanently
Hi,

I made a script that sort a file, export the file (FM format) then
delete's all records and import the file again.
This works great, BUT the exported file contains all data without
password protection.
How can I made a scriptstep that kills the export file after the
import?

With kind regards,

Huib van Wees



Mon, 21 Mar 2005 18:27:50 GMT
 Sort a file permanently

Windows:

If you know the path to the exported file in Windows make a batch file in
notepad called say"DelExport.bat" use 'Del path filename' where path =
(example) C:\export and file is Your exported file name. so
C:\Export\Export.fp5
The syntax below:
Del (Erase)
Deletes specified files.

del [drive:][path] filename [ ...] [/p] [/f] [/s] [/q] [/a[:attributes]]

erase [drive:][path] filename [ ...] [/p] [/f] [/s] [/q] [/a[:attributes]]

Parameters

[drive:][path] filename

Specifies the location and name of the file or set of files you want to
delete. Multiple file names can be used. File names can be separated by
spaces, commas, or semicolons.

/p

Prompts you for confirmation before deleting the specified file.

/f

Forces deletion of read-only files.

/s

Deletes specified files from the current directory and all subdirectories.
Displays the names of the files as they are being deleted.

/q

Quiet mode; does not prompt for delete confirmation.

Call this from a "Send Message" Step SendMessage(Path to batch file) and add
to the end of your import script.

Mac:

If mac Applescript will do it but needs someone else as I'm PC only

hth

PatrickK



Quote:
> Hi,

> I made a script that sort a file, export the file (FM format) then
> delete's all records and import the file again.
> This works great, BUT the exported file contains all data without
> password protection.
> How can I made a scriptstep that kills the export file after the
> import?

> With kind regards,

> Huib van Wees



Mon, 21 Mar 2005 19:53:57 GMT
 Sort a file permanently
Instead of exporting to a filemaker file, why not run an external script in
a temporary filemaker file that imports the records? That way you could
later run a second external script from this same file that deletes all the
records.  This file can be extremely basic: just field names of data entry
fields and two scripts.

From the permanent filemaker file, create a script that

1. freezes the window
2. creates a backup of the permanent filemaker file (Murphy's Law an' all)
3. finds all records
4. sorts them
5. calls an external script in the temporary filemaker file that imports the
records
6. deletes all records in current set of the permanent file
7. imports all records from the temporary filemaker file
8. calls an external script in a temporary filemaker file that deletes all
records

The temporary file could be used again and again - except for the brief
period that the script is running, it would always be empty. No need for
passwords or privileges - although (cf export method) you could even add
these if you wanted to.

It may be quicker to sort the records from the temporary file.

--
Bridget Eley



Quote:
> Hi,

> I made a script that sort a file, export the file (FM format) then
> delete's all records and import the file again.
> This works great, BUT the exported file contains all data without
> password protection.
> How can I made a scriptstep that kills the export file after the
> import?

> With kind regards,

> Huib van Wees



Tue, 22 Mar 2005 04:54:07 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Unable to permanently add entry to Hosts: file not found

2. Most efficient sort text file routine, sort algorithms

3. Patch to remove sort files, temp tables, unreferenced files

4. Patch to remove sort files, temp tables, unreferenced files

5. How can set dateformat in permanently mode?

6. Through DTS Package Records Not Deleted Permanently in Vis.FoxPro

7. How to delete records permanently in Visual FoxPro using ODBC

8. How To Set Dateformat permanently

9. How can set dateformat in permanently mode?

10. Database permanently 'recovering'

11. How to permanently SET ANSI_WARNINGS OFF for all users in a DB

12. How do I permanently set DATEFORMAT to DMY


 
Powered by phpBB® Forum Software