Newbies Ken Shick Posted July 28, 2010 Newbies Posted July 28, 2010 New to this but got the function registered. I want to test if a file exists so I am using a FM scrip step SetField( MyDB::TextField ; CheckWhetherFileExists( "/Users/Dekstop/outlook.pst" )] I get a zero in the TextField regardless of the path I use. I am using Win7 and FMProAdv11.v2
Smef Posted July 28, 2010 Posted July 28, 2010 Make sure you specify your full filepath, such as "c:usersusernamedesktopmypicture.jpg"
Newbies Ken Shick Posted July 28, 2010 Author Newbies Posted July 28, 2010 I finally got it. Does the path always have to begin with "users"? What about the case when you don't know the user name or the case where the file is on the C Drive. I have many support files in a folder on the C drive and need to know if they are there. Thanks,
Fenton Posted July 28, 2010 Posted July 28, 2010 You can parse the user name out of a FileMaker function like: Get (DesktopPath) or Get (DocumentsPath)
Smef Posted July 30, 2010 Posted July 30, 2010 You can use any valid filepath. It works exactly the same as your regular windows filepath. A user's desktop happens to be in that user's folder, but you can specify any file on your system. You can specify files or folders on other drives by using the other drive letter instead of your C drive, for example, if you had a file named "mybackup.zip" in the "backups" folder which was on the root of your D drive, you would use the path "D:backupsmybackup.zip"
Recommended Posts
This topic is 5248 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