Icon

Create File or Folder Variables

This is based on the Open File or Folder component, but has additional features for creating a file or folder variable

If executed, and the option to "Open" is selected, it also attempts to open the specified location or file in Explorer (or equivalent) or the associated application.

Only tested with Windows 10 but it may work with other OS, as it uses Java.awt.desktop and does not directly call Windows Explorer or other operating system specific functions.

The location specified should be a valid absolute file/folder path if the location type is specified as "Absolute".

Note that the path handling is performed outside of the KNIME software and so it is not possible to use knime:// protocol paths here.

If the location type is either Workflow Folder, or Workflow Data Folder, then the location should point to a valid subfolder or file relative to the specified Workflow Folder/Data Folder.


18 Oct 2023 @takbb Brian Bates

Options

Physically open location or execute file
If selected/checked it will attempt to open the workflow folder when executed. If the location represents a file, it will cause that file to be opened in its associated external application, or executed if it is an executable file (use with caution for executables!)%%00010%%00010If unchecked, it will take no action other than to create flow variables (and create folder if that option has been chosen)%%00010%%00010Disabling allows you to leave it on the workflow and not have it open the folder/execute file every time the node is executed.
Create Workflow Data Folder ( if it doesn't exist)
Creates workflow data folder if it does not currently exist
Location type
Enter the type of location, to indicate if this represents a folder in the current workflow or an Absolute path
Helper list of variable items that can be included (use keyboard copy/paste shortcut)
List of available variable items available to copy/paste using keyboard shortcut, e.g. Ctrl C (copy), Ctrl V (paste) in Windows, or equivalent in other Operating Systems.
Location/File to open
A string representing the folder (or a file) to be opened on execution.%%00010%%00010Leave blank to open the workflow folder%%00010%%00010%%00010You can include the following placeholders in the folder/date string%%00010%%00010{yyyy} or {yy}Current year in 4 or 2 digit format %%00010{dd} Current day in 2 digit format %%00010{ddd} Current Day of week in short format (uses your default system locale) %%00010{MM} Current month in 2 digit format%%00010{MMM} Current month name in short format (uses your default system locale) %%00010{DATE} same as {yyyy}-{MM}-{dd}%%00010{DATE} same as {yyyy}-{MM}-{dd}%%00010{DATEymd} same as {yyyy}-{MM}-{dd}%%00010{DATEydm} same as {yyyy}-{dd}-{MM}%%00010{DATEdmy} same as {dd}-{MM}-{yyyy}%%00010{DATEmdy} same as {MM}-{dd}-{yyyy}%%00010{TIME} or {TIMEhms} same as {HH}{mm}{ss}%%00010{TIMEhm} same as {HH}{mm}%%00010{HH} hour in 24 hour clock%%00010{mm} 2 digit minute%%00010{ss} 2 digit second%%00010{GUID} or {UUID} a generated Universally Unique Identifier%%00010%%00010%%00010
Create flow variables using base-name
Creates flow variables using the given variable base_name. %%00010_loc - just the local filename (with no path information)%%00010_path - a Path variable to file with path location%%00010- a String variable to the file with path location%%00010_url - a URL variable to the file with path location%%00010If the value is blank, the default name of loc:xxx: will be used%%00010%%00010

Input Ports

This node has no input ports

Output Ports

Icon
No description for this port available.

Nodes

Extensions

Links