Jump 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.

Read folder with command Line

Featured Replies

The following script works in Filemaker Pro 8

Go to Layout {"InvoiceViewer"(Invoiceviewer)}

Show All Records

Delete All Records[]

Send Event ["aevt", "odoc"; "cmd/c dir /b M:FolderfolderPDFfolder >c:outputfile.txt"]

Pause/Resume Script [Duration(seconds):5]

Import Records["outputfile.txt";Add; Windows ANSI]

Show All Records

But when I create a runtime it fails with the following message:

The file "outfile.txt" could not be found and is required to complete this operation

If I hit the OK button it allows me to select the file and the script continues.

It worked in the previous runtimes I created.

Any ideas?

Edited by Guest

  • Author

That's odd. I created the runtime on an XP computer and deployed it to a Windows 2000 computer. Works fine on the Windows 2000 computer but not on the XP computer. Got to be a system problem but what??

I know the XP system is set to do automatic updates, I wonder if that has something to do with it?

It fails on the import step, right?

how's that file reference defined?

file:/c:/outfile.txt

Sounds like the runtime machine doesn't have enough time with the 5 seconds to finish the text file before the import script needs it. When you use the manual dialog you can see the file because the OS has now finished writing to it...

You could capture for the can't find file error in a loop and proceed if no error

  • Author

Probably Pilot Error :)

It fails on the import step, right?

Correct

how's that file reference defined?

file:/c:/outfile.txt

For some reason i thought you had to have a file created already. So I created a file and when I selected the file I got the following listing in the File Path List:

file:.../../../../outputfile.txt

But now when I typed in the reference (as you described above): file:/c:/outputfile.txt

It works like a charm. And creates the necessary file.

Thanks Wim

You're welcome.

The .../.../... indicates a relative path with the starting point being where the FM file is. In your case it basically says "go up 4 levels from where I am". When you move the file that is likely to break.

hard coding the location works wherever the file is.

Create an account or sign in to comment

Important Information

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

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.