john9210 Posted April 24, 2012 Posted April 24, 2012 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
jbante Posted April 24, 2012 Posted April 24, 2012 Forward slashes is correct for the purposes of the import file source, even on Windows. See if that resolves the issue.
john9210 Posted April 24, 2012 Author Posted April 24, 2012 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.
jbante Posted April 24, 2012 Posted April 24, 2012 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.
comment Posted April 24, 2012 Posted April 24, 2012 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.
john9210 Posted April 24, 2012 Author Posted April 24, 2012 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?
jbante Posted April 25, 2012 Posted April 25, 2012 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.
Recommended Posts
This topic is 4595 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 accountSign in
Already have an account? Sign in here.
Sign In Now