Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5797 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Okay, it seems like a small thing. But I have pet peeve about not wanting to leave the Import Log around after we run an import. I think it looks trashy. Is there anything we can do to 1) specify sending it to a system temp folder or 2) suppressing it altogether?

Posted (edited)

Not only at actual import? they seem to be self generating at times; actually copy and paste fields into a db tbl generates an import log...

Perform AppleScript do Shell script in mac works;

home relative relative path (~/...) is required for the shell script to execute; using absolute path (/volumename/users/...) does not work (at least I have not been able to get it to work). Hence the following may seem longer than necessary. This could also be compacted but current format allows you to follow the massage sequence.

The script allows the actual filemaker file to be located 'anywhere', the proviso is that the Import.log is at the same tree level & location as the FM file.

Can send example demo file if required.

Should also be possible to include a -i to Invoke an interactive mode that prompts for confirmation before removing a file; but haven't got that to work.

The script can be adpated for delete a directory as well (rmdir)

rm - delete file using calculated home relative path

#desktop path as reference

Set Variable [ $_pathDT; Value:Get ( DesktopPath ) ]

#subout for the relative ~ path

Set Variable [ $_stub; Value:Substitute( $_pathDT ; "Desktop/" ; "")

// note case sensitive ]

#

#

#

# filepath of current FileMaker file

Set Variable [ $_FILEpath; Value:Substitute( Get ( FilePath ); "file:" ; "") ]

#remove the filename

Set Variable [ $_path; Value:Substitute( $_FILEpath; Get ( FileName ) & ".fp7" ; "") ]

#subout for the relative ~ path

Set Variable [ $_pathREL; Value:Substitute( $_path ; $_stub ; "") ]

#apply relative path syntax

Set Variable [ $_pathREL; Value:"~/" & Substitute( $_path ; $_stub ; "") ]

#rename $ (for shell variable use )

Set Variable [ $_path; Value:"~/" & Substitute( $_path ; $_stub ; "") ]

#

#

#original: "mkdir ~/Desktop/"" & $_folderName & """

Set Variable [ $_shellCmd; Value:Let([

FP = $_PATH ;

FILE= "import.log"

//"~/Desktop/"

];

"rm " & FP & """ & FILE & """

) ]

#

#create folder

Set Variable [ $_script; Value:"do shell script "" &

Substitute($_shellCmd ;

[""";"""]

)

& """ ]

Perform AppleScript [ Calculated AppleScript: $_script ]

Edited by Guest
Posted

Thank you both for suggestions! I can't use AppleScript in xplat but I shall study it for future nonetheless.

I searched my home FM Windows test box (4-year-old Dell) and found 57 Import.Log files scattered throughout. It seems that FM determins where the import.log should be plopped and it is not always on the desktop (although it may be if networked; I haven't tested yet).

This almost-forgotten feature feels like an old throwback similar to when printing to a file. FM opens a dialog asking for a file name but then you have to search for the file - it is stored where you last opened an FM file (and not where the current FM file necessarily resides). And I just performed a test import from a file on my desktop and then searched and have NO import log dated today on this entire box but the (manual) import was successful!

It seems that I would need to 1) identify the exact path that FM thinks the log should be stored and 2) only delete the import.log from THAT path. Otherwise, another program *might* also create an import.log and I might not want to delete it (if it exists in a system directory, for example). All 57 Import.Logs on this box are FM-created however.

It would be nice to be given ability to suppress the file creation (since we can error trap it) or specify a temp path for it. This silly file has existed since I started using FM (vs 6). I will play with all of this - I can use DOS batch and move/delete files etc. but careful is right ... and I don't want to have to perform a search across my hard drive to find out where FM decided to stick it. As said, I haven't tested and my perceptions might be wrong here. :wink2:

This topic is 5797 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.