Gavin_Paolucci-Kleinow-URMC.Rochester wrote: That does work, but isn't what I'm looking for. I'm hoping to check if the file is imported before trying t import. Any other ideas?
You could use the example given in the API examples in "Site Manager -> Support -> API Examples -> Tools -> Media -> Media File -> Get and update file" as a basis:
// Get the media file
MediaFileInfo foundFile = MediaFileInfoProvider.GetMediaFileInfo(CMSContext.CurrentSiteName, "MyNewFolder/MyNewFile.gif", null);
if (foundFile != null)
{
// Stop! File already exists in library!
}
else
{
// File not found in library. Proceed with import.
}