script help

Can Someone help I have a Source Folder With a File and I want to remove the extension (.gif) from the filename to get the string value of just the file. Then I want to go to find mode in my filemaker db called BUILD that has a layout in it called INVEN. Next would be to go to field state and enter the filename to Find. Then go to field pic and import the filepath.

set SourceFolder to (choose folder with prompt)

tell application "Finder" to set filelist to get the name of every file of folder SourceFolder as list
repeat with thisFileName in Filelist
	--path of file 
	set thisPath to (SourceFolder as string) & ":" & thisFileName as string
	
	tell application "FileMaker Pro"
		tell BUILD
   Layout INVEN
			set cell "state" of request 1 to "thisFileName"
			find layout INVEN
     set cell "Pic" to Import thisPath
		end tell
	end tell

try this

select the source folder’s contents in Finder and go to the get info dialog and check the hide extension box under “name & Extension”

then when you run the script it will not see the extension

if you use the “displayed name” instead of “name”

or you can script this to turn off extension then turn back on afterwords

There are so many ways to do this. Here is the code I use to get the name and extension of a file:

Jon


[This script was automatically tagged for color coded syntax by Script to Markup Code]