Skip to main content

Image File

Image File

Image File is an input node which will scan a file and load the Image Information (width/height etc) for processing in the flow.

Variables

VariableDescriptionTypeExample
img.WidthImage widthnumber1920
img.HeightImage heightnumber1080
img.FormatImage formatstringPNG
img.IsPortraitIf the image is portraitbooltrue
img.IsLandscapeIf the image is landscapeboolfalse
img.DateTakenIf available, full DateTime the image was takenDateTime2020-04-23 12:00:23
img.DateTaken.YearIf available, year an image was takennumber2020
img.DateTaken.MonthIf available, month an image was takennumber4
img.DateTaken.DayIf available, day an image was takennumber23

Move Files Based On Dates

If you wish to move a file to a folder based on the data it was taken.

Say, your base folder is D:\Pictures\Family Photos

Alt text

Download Flow

You can use the Move File or Copy File flow element with the following parameters

FieldValue
Destination FolderD:\Pictures\Family Photos\{img.DateTaken.Year}\{img.DateTaken.Month}

This will move or copy the files to folders when a photo was taken.

If you may wish to first test if the DateTaken is avilable first, in that case you can use a Function before the Move File or Copy File with the following code

return Variables.img?.DateTaken ? 1 : -1;

This will fail the flow if the DateTaken does not exist. If you wish to instead call a second output instead, you can increase the Function outputs to 2 and then use this code instead

return Variables.img?.DateTaken ? 1 : 2;