April 24, 201213 yr I am having a problem with importing a text file with the import records script step. I keep getting the error “the file cannot be found…”. I’m using the relative path approach and I’ve even tried using a full path. Both the target file and the FileMaker file are in the same directory. The file format for the target file is file:File Directory\Test.txt (although the example files in the Specify file dialog shows forward slashes!). I’ve attached a sample files, including the Filemaker file and the Test.txt file for testing purposes.I'm using Win 7, 64 bit. Any suggestions? File Directory.zip
April 24, 201213 yr Forward slashes is correct for the purposes of the import file source, even on Windows. See if that resolves the issue.
April 24, 201213 yr Author I tried forward a forward slash. It did not solve the problem. Both the FileMaker and text files are in the directory named "File Directory". In the Specify File dialog I'm using the format "File:File Directory/Text.txt" Note that there is a space in the directory name. I've even tried renaming the directory without a space. No luck.
April 24, 201213 yr If your FileMaker file and the file you're trying to import are in the same directory, the relative path should be just "file:Text.txt" (note lowercase "file:"), with no directory. "file:File Directory/Text.txt" will look for a folder named "File Directory" in the same folder as the FileMaker file. If that doesn't work, the next thing to try is an absolute path: "filewin:/C/.../File Directory/Text.txt". This should tell you whether the problem is your relative path syntax or something with the file system or the file you're trying to import.
April 24, 201213 yr In the Specify File dialog, click the "Add File…" button and select the file to import. This will insert the correct path to the file - which should be: file:Test.txt if both the source file and the target solution are in the same directory.
April 24, 201213 yr Author Jeremy: I dropped the folder name it it works fine. However, in FM's "Creating file paths" is shows the relative path to the target file is given by "file:directoryName/fileName". Am I missing someting?
April 25, 201213 yr John: That's just the example, which can't capture every possibility. It's a better reminder for people who already know how it works than it is an instruction manual. I imagine FileMaker's help system would have more thorough documentation.
Create an account or sign in to comment