Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

File Delete using Export Field Contents

Featured Replies

According to FM Training Series "if you specify a file path/name for output (either explicitly or by

a variable reference) and do not select a field to export, that file, if it exists, will be deleted from the user’s

workstation"

Does anyone know why the DeleteFile script in the attached sample file does not work?

The file path comes directly from the original import file path.

TestDelete.zip

Try this one:

Set Error Capture [ On ]

Set Variable [ $filePath ; [color:red]Value: GetAsText ( testfiledelete::Image_cr ) ]

Export Field Contents [ $filePath ]

[color:red]Refresh Window [ ]

The FMP 9 Script Steps Reference document says that "if no field is specified, FileMaker Pro will export the contents of the current field in the active table".

It says nothing about deleting files, and I kind-of doubt it would be designed to do that (could be wrong though).

  • Author

It does work, although not likely designed that way.

raybaudi's example (thank you) works great for image files, but failed for pdfs.

This works for both.

$fileName = Substitute( testfiledelete::OriginalPath_lxt; "file:/"; "file:")

The result of the field containing original file path has two "/", only one works when trying to delete a file. I don't know why...

If anyone has more info on this I would like to here it.

Thanks for your replies.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.