Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • All lines containing a Command are created as virtuals. This is a recommended best practice

  • Images are imported from a Windows folder called ..\Hotfolder\ImageDatabase. You must create this folder manually

  • Images are imported to a feature called ImageDatabase. This is a selectable image feature

  • Image file names are used as keys in import file. This means that a new image in the Windows folder with a file name identical to an exiting image in Perfion will overwrite the existing image.

  • The script linked to Name/FileName checks if file to import is actually an image file

  • The File.Move script moves imported images to a Windows folder called ..\Hotfolder\ImageDatabase\Imported.  You must create this folder manually

  • Supported image formats: BMP, GIF, JPG/JPEG, PNG, TIFF/TIF, EPS, PSD, PDF, SVG, WEBP, AVIF

Sample data for building Action Map

Info

NOTE: Line breaks are omitted if you paste scripts from the table below directly to an action. In stead, paste script to Notepad++ and then copy from there. That will preserve line breaks when you paste into an action.

Action Map - From

To

Command

Action

Script

Note

c:\Perfion Data\ActionSources\Hotfolder\ImageDatabase

Files

GET.FILELIST

Files

Images

SELECT

Name

FileName

string extension = "" + V["Extension"];
bool isImage = Perfion.IsSupportedImageFormat( extension );
Validate.SkipItem( !isImage, "File '{FileName}.{Extension}' is not an image" );

FilePath

_Value

Images

ImageDatabase

IMPORT

Files

Move

SELECT

Name

File.Move(
Make("{FilePath}")
,Make( @"C:\Perfion Data\ActionSources\Hotfolder\ImageDatabase\Imported\{Name}.{Extension}" )
);