fmSelectAll

Purpose:

Select all files and/or folders in the current directory.

Category:

File Processing

Syntax:

fmSelectAll "connection id" "options"

connection id

The name assigned to the connection you want to affect. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

options

This is a compound parameter and can contain any combination of the following items:


IncludeFiles=yes/no

Yes = include files in the selection. No = do not include files in the selection.

IncludeFolders=yes/no

Yes = include folders in the selection. No = do not include folders in the selection.


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmSelectAll "Local1" "IncludeFiles=Yes;IncludeFolders=No"


fmSelectSome

Purpose:

Select specific files and/or folders in the current directory by name or mask.

Category:

File Processing

Syntax:

fmSelectSome "connection id" "items" "options"

connection id

The name assigned to the connection you want to affect. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

items

A list of items to be selected. The list may contain actual file names or file masks with wildcard characters (?, *). Multiple items should be separated with semicolons (;).

options

This is a compound parameter and can contain any combination of the following items:


IncludeFiles=yes/no

Yes = include files in the selection. No = do not include files in the selection.

IncludeFolders=yes/no

Yes = include folders in the selection. No = do not include folders in the selection.

ScrollIntoView=yes/no

Yes = scroll the file browser to bring first selected item into view. No= do not change the browser's scroll position.


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmSelectSome "Local1" "*2010.doc;*.xls" "IncludeFiles=Yes;IncludeFolders=No; ScrollIntoView=Yes"


fmSelectOne

Purpose:

Select one file in the current directory that matches a specific name or mask. This action is similar to fmSelectSome, except that only one file among those matching the mask will be selected. The file selected is based on the direction parameter (first, next, prev, last) and the currently selected items (if any).

Category:

File Processing

Syntax:

fmSelectOne "connection id" "items" "direction" "options"

connection id

The name assigned to the connection you want to affect. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

items

A list of items to be selected. The list may contain actual file names or file masks with wildcard characters (?, *). Multiple items should be separated with semicolons (;).

direction

The direction used to determine which item should be selected. This can be one of the following:


First

Select the first matching item.

Next

Select the next matching item. If nothing is selected, then the first matching item will be selected.

Prev

Select the previous matching item. If nothing is selected, then the last matching item will be selected.

Last

Select the last matching item.

options

This is a compound parameter and can contain any combination of the following items:


IncludeFiles=yes/no

Yes = include files in the selection. No = do not include files in the selection.

IncludeFolders=yes/no

Yes = include folders in the selection. No = do not include folders in the selection.

ScrollIntoView=yes/no

Yes = scroll the file browser to bring first selected item into view. No= do not change the browser's scroll position.


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmSelectOne "Local1" "*2010.doc;*.xls" "Next" "IncludeFiles=Yes; IncludeFolders=No;ScrollIntoView=yes"


fmInvertSelection

Purpose:

Invert the current selection. Selected items will become unselected and unselected items will become selected.

Category:

File Processing

Syntax:

fmInvertSelection "connection id" "options"

connection id

The name assigned to the connection you want to affect. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

options

This is a compound parameter and can contain any combination of the following items:


IncludeFiles=yes/no

Yes = include files in the selection. No = do not include files in the selection.

IncludeFolders=yes/no

Yes = include folders in the selection. No = do not include folders in the selection.


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmInvertSelection "Local1" "IncludeFiles=Yes;IncludeFolders=No"


fmUnselectAll

Purpose:

Clear the current selection.

Category:

File Processing

Syntax:

fmUnselectAll "connection id" "options"

connection id

The name assigned to the connection you want to affect. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

options

This is a compound parameter and can contain any combination of the following items:


IncludeFiles=yes/no

Yes = files will be unselected. No = files will not be affected.

IncludeFolders=yes/no

Yes = folders will be unselected. No = folders will not be affected.


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmUnselectAll "Local1" "IncludeFiles=Yes;IncludeFolders=Yes"


fmCopySelected

Purpose:

Copy selected items from one connection to another. Items (files and folders) may be selected programmatically using the fmSelectAll or fmSelectSome actions, or interactively by the user if a visible File Browser has been created for the connection. The visible File Browser also allows users to initiate a file copy by dragging and dropping files between browsers and other applications. The fmCopySelected action can be used if you want to initiate a file copy programmatically from a Push Button or without interaction from the user.


Note: When copying files to or from a remote connection via FTP you can set the default file transfer mode using the fmSetDefaultTransferMode action.

Category:

File Processing

Syntax:

fmCopySelected "source connection id" "target connection id" "options"

source connection id

The name assigned to the connection containing the selected files or folders you want to copy. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

target connection id

The name assigned to the connection you want to copy the selected files or folders to. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

options

This is a compound parameter and can contain any combination of the following items:


GetConfirmation=yes/no

Yes = display a confirmation dialog before overwriting any existing files. No = do not display a confirmation dialog.


Note: The confirmation dialog provides users with the opportunity to OK or cancel file operations that would overwrite existing files. The confirmation dialog can be customized using the fmTranslateStrings action, or replaced entirely with something of your own design (see Special Subroutines).


ShowProgress=yes/no

Yes = Display the progress window. No = do not display the progress window.


Note: The progress window provides feedback to the user about the status of the file copy. It also provides the user with an option to abort the procedure before completion. The progress window can be customized using the fmTranslateStrings action, or replaced entirely with something of your own design (see Special Subroutines).


AllowResume=yes/no

Yes = Allow resume for FTP downloads. If a confirmation dialog is displayed, it will contain a check box allowing users the option of enabling or disabling the Resume feature. No = Do not allow resume to be used.


Note: Resume can be useful when a download is interrupted before completion. Resume allows you to continue a download from where it left off rather than starting over. Resume can only be used with binary transfer mode and must be supported by the FTP server. This option only affects files copied from an FTP server to a local drive.


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmCopySelected "Local1" "Remote1" "GetConfirmation=Yes;ShowProgress=Yes"


fmMoveSelected

Purpose:

Move selected items from one connection to another. Items (files and folders) may be selected programmatically using the fmSelectAll or fmSelectSome actions, or interactively by the user if a visible File Browser has been created for the connection. The visible File Browser also allows users to initiate a file move by dragging and dropping files between browsers and other applications. The fmMoveSelected action can be used if you want to initiate a file move programmatically from a Push Button or without interaction from the user.


IMPORTANT: Moving of files is not supported for remote/FTP connections. If either the source or target are remote connections, fmMoveSelected will copy the files instead.

Category:

File Processing

Syntax:

fmMoveSelected "source connection id" "target connection id" "options"

source connection id

The name assigned to the connection containing the selected files or folders you want to move. The connection must have already been opened with fmConnectLocal.

target connection id

The name assigned to the connection you want to move the selected files or folders to. The connection must have already been opened with fmConnectLocal.

options

This is a compound parameter and can contain any combination of the following items:


GetConfirmation=yes/no

Yes = display a confirmation dialog before overwriting any existing files. No = do not display a confirmation dialog.


Note: The confirmation dialog provides users with the opportunity to OK or cancel file operations that would overwrite existing files. The confirmation dialog can be customized using the fmTranslateStrings action, or replaced entirely with something of your own design (see Special Subroutines).


ShowProgress=yes/no

Yes = Display the progress window. No = do not display the progress window.


Note: The progress window provides feedback to the user about the status of the file move. It also provides the user with an option to abort the procedure before completion. The progress window can be customized using the fmTranslateStrings action, or replaced entirely with something of your own design (see Special Subroutines).


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmMoveSelected "Local1" "Local2" "GetConfirmation=No;ShowProgress=Yes"


fmDeleteSelected

Purpose:

Permanently delete selected items from a connection. Items (files and folders) may be selected programmatically using the fmSelectAll or fmSelectSome actions, or interactively by the user if a visible File Browser has been created for the connection.


Note: The Delete action cannot be undone, so use it with caution. If you need a more forgiving way to remove files and folders, use the fmRecycleSelected action instead.

Category:

File Processing

Syntax:

fmDeleteSelected "connection id" "options"

connection id

The name assigned to the connection containing the selected files or folders you want to delete. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

options

This is a compound parameter and can contain any combination of the following items:


GetConfirmation=yes/no

Yes = display a confirmation dialog before deleting anything. No = do not display a confirmation dialog.


Note: The confirmation dialog provides users with the opportunity to OK or cancel the delete. The confirmation dialog can be customized using the fmTranslateStrings action, or replaced entirely with something of your own design (see Special Subroutines).


ShowProgress=yes/no

Yes = Display the progress window. No = do not display the progress window.


Note: The progress window provides feedback to the user about the status of the delete process. It also provides the user with an option to abort the procedure before completion. The progress window can be customized using the fmTranslateStrings action, or replaced entirely with something of your own design (see Special Subroutines).


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmDeleteSelected "Local1" "GetConfirmation=Yes;ShowProgress=Yes"


fmRecycleSelected

Purpose:

Move selected items from a connection to the Windows recycle bin. Items (files and folders) may be selected programmatically using the fmSelectAll or fmSelectSome actions, or interactively by the user if a visible File Browser has been created for the connection.


Note: Recycling of files is not supported for remote/FTP connections.

Category:

File Processing

Syntax:

fmRecycleSelected "connection id" "options"

connection id

The name assigned to the connection containing the selected files or folders you want to recycle. The connection must have already been opened with fmConnectLocal.

options

This is a compound parameter and can contain any combination of the following items:


GetConfirmation=yes/no

Yes = display a confirmation dialog before recycling anything. No = do not display a confirmation dialog.


Note: The confirmation dialog provides users with the opportunity to OK or cancel the recycle. The confirmation dialog can be customized using the fmTranslateStrings action, or replaced entirely with something of your own design (see Special Subroutines).


ShowProgress=yes/no

Yes = Display the progress window. No = do not display the progress window.


Note: The progress window provides feedback to the user about the status of the recycle process. It also provides the user with an option to abort the procedure before completion. The progress window can be customized using the fmTranslateStrings action, or replaced entirely with something of your own design (see Special Subroutines).


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmRecycleSelected "Local1" "GetConfirmation=Yes;ShowProgress=Yes"


fmRenameSelected

Purpose:

Rename selected items in a connection. Items (files and folders) may be selected programmatically using the fmSelectAll or fmSelectSome actions, or interactively by the user if a visible File Browser has been created for the connection.

Category:

File Processing

Syntax:

fmRenameSelected "connection id" "new name mask" "options"

connection id

The name assigned to the connection containing the selected files or folders you want to rename. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

new name mask

A mask that defines what the items' new names will look like. You can use wildcards (* and ?) as part of the name. The characters represented by the wildcards will be identical to the corresponding characters in the item's original name. For example, the following will change the extensions of all files in the list to .txt while leaving the base file names intact:


"*.txt"


options

This is a compound parameter and can contain any combination of the following items:


ShowProgress=yes/no

Yes = Display the progress window. No = do not display the progress window.


Note: The progress window provides feedback to the user about the status of the rename process. It also provides the user with an option to abort the procedure before completion. The progress window can be customized using the fmTranslateStrings action, or replaced entirely with something of your own design (see Special Subroutines).


Separate multiple items in a compound parameter with semicolons (;).

Example:

fmRenameSelected "Local1" "*.txt" "ShowProgress=Yes"


fmCreateFolder

Purpose:

Create a new folder.

Category:

File Processing

Syntax:

fmCreateFolder "connection id" "folder name"

connection id

The name assigned to the connection where you want to create the new folder. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

folder name

The name for the new folder. If the name does not include a path, then the folder will be  created in the connection's current directory

Example:

Create a folder called "My Projects" in the current directory:


fmCreateFolder "Local1" "My Projects"


Create a folder called "2010" in the user's Documents folder:


fmCreateFolder "Local1" "[MyDocuments]2010"


fmGetSelectedInfo

Purpose:

Get the size, type, date, time, attributes or permissions for all selected items.

Category:

File Processing

Syntax:

fmGetSelectedInfo "connection id" "info type" "info format" "variable"

connection id

The name assigned to the connection containing the selected files or folders. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

info type

The type of information you want to retrieve. Use one of the following types:


Size

The item's size.


Note: This action cannot be used to calculate the size of folders. When used with folders it will return a size of zero.

Type

The item's type. This is a descriptive string obtained from Windows. The exact description can vary depending on the Windows version and configuration.

Date

The date the item was last modified.

Time

The time the item was last modified.

Attributes

For local file system connections this will be the item's Windows/DOS attributes (A=Archive, R=Read-Only, H=Hidden, S=System). For remote/FTP file systems, this will be the item's numeric permissions (CHMOD number).

info format

The formatting to be used for the retrieved information. The format depends on the info type selected above. Valid formats for each info type are:


info type

format

Size

One of the following:


Plain

The size will be returned as an integer value with no formatting. This option is best if you want to use the size in a mathematical calculation.

Formatted

The size will be formatted to include a thousands separator (if necessary) and reduced to the nearest gigabyte, megabyte, kilobyte or byte. For example:


2.78 MB

1.5 KB

108 Bytes

Type

Not used.

Date

Use the codes from the following table to compose the date format:


d

Show the day as a number without a leading zero (1-31).

dd

Show the day as a number with a leading zero (01-31).

ddd

Display the day as an abbreviation (Sun-Sat).

dddd

Display the day as a full name (Sunday-Saturday).

ddddd

Display the date using the system short date format as defined in the Windows Control Panel.

dddddd

Display the date using the system long date format as defined in the Windows Control Panel.

m

Show the month as a number without a leading zero (1-12).

mm

Show the month as a number with a leading zero (01-12).

mmm

Display the month as an abbreviation (Jan-Dec).

mmmm

Display the month as a full name (January-December).

yy

Show the year as a two-digit number (00-99).

yyyy

Show the year as a four-digit number (0000-9999).

/

Display the date separator character as defined in the Windows Control Panel.

Default

Use the system’s default short date format. (Same as ddddd above.)


For example, "m/d/yyyy" will result in a date formatted as Month/Day/Year or "1/15/2011". Entering "dddd, mmmm d, yyyy" will result in a date formatted as "Saturday, January 15, 2011".

Time

Use the codes from the following table to compose the time format:


h

Display the hour without a leading zero (0-23).

hh

Display the hour with a leading zero (00-23).

n

Display the minute without a leading zero (0-59).

nn

Display the minute with a leading zero (00-59).

s

Display the second without a leading zero (0-59).

ss

Display the second with a leading zero (00-59).

t

Display the time using the short (without seconds) system time format as defined in the Windows Control Panel.

tt

Display the time using the long (with seconds) system time format as defined in the Windows Control Panel.

ampm

When used with the "h" or "hh" codes, this option will display the time in 12-hour format followed by the "AM" or "PM" symbols as defined in the Windows Control Panel.

:

Display the time separator character as defined in the Windows Control Panel.

Default

Use the system’s default short time format. (Same as "t" above.)


For example, "h:nn ampm" will result in a time that looks like "5:30 pm".

Attributes

Not used.


variable

The name of the variable where the retrieved information will be stored. If multiple items are selected, the information will be separated by the global delimiter.

Example:

fmGetSelectedInfo "Local1" "Date" "m/d/yy" "[FileDates]"


fmSetSelectedInfo

Purpose:

Set the date, time, attributes or permissions for all selected items.

Category:

File Processing

Syntax:

fmSetSelectedInfo "connection id" "info type" "date format" "new value"

connection id

The name assigned to the connection containing the selected files or folders. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

info type

The type of information you want to set. Use one of the following types:


DateTime

Set the item's date and/or time stamp.


Note: Many FTP servers do not support setting of the file date or time.

Attributes

Set the item's attributes or permissions. The types of attributes that can be modified are different depending the type of connection. For local connections the available attributes are Archive (A), Read-Only (R), System (S) and Hidden (H). For FTP connections, the attributes correspond to the standard file permissions used by the Unix CHMOD command.

date format

The formatting to be used when setting the item's date stamp. This is the format of the date passed in the value parameter. The date format may be one of the following:


m/d/y

Month/Day/Year

d/m/y

Day/Month/Year

y/m/d

Year/Month/Day

Default

Use the system’s default short date format.


This parameter is ignored when setting attributes or permissions.

new value

The new date/time or attributes/permissions to be applied to the selected items. The value depends of the info type selected above.


info type

value

DateTime

The date and/or time to apply to the selected items.


The date must match that specified by the date format parameter. Year values between 0 and 99 are assumed to be in the current century. For example:


"1/15/11"


is the same as


"1/15/2011"


The date may be omitted to leave the item's existing date unchanged.


The time can be specified in either 12 or 24 hour format. For example:


"3:45pm"


or


"15:45"


The time may be omitted to leave the item's existing time unchanged.


If both a data and time are specified then the date must be first followed by the time. For example:


"1/15/2011 3:45pm"

Attributes

The new attributes or permissions to apply to the selected items.


For local connections, you can use any combination of the following Windows/DOS file attributes:


A

Sets the Archive file attribute.

R

Sets the Read-Only file attribute.

S

Sets the System file attribute.

H

Sets the Hidden file attribute.


For example, to set the selected files to archive and read-only use the following:


"AR"


For remote/FTP connections, you can use either numeric or string permissions (CHMOD). For example, the permissions for a common HTML file on a Unix server could be set like this:


"644"


or


"-rw-r--r--"


NeoFM/FTP provides two helpful actions called fmCHMODNumToPermStr and fmPermStrToCHMODNum to convert between these two permission formats.


Example:

fmSetSelectedInfo "Local1" "DateTime" "m/d/yy" "1/15/2011 3:45pm"


fmFileListToVar

Purpose:

Copy a list of file and/or folder names to a variable.

Category:

File Processing

Syntax:

fmFileListToVar "connection id" "options" "variable"

connection id

The name assigned to the connection containing the list of files/folders that you want to store in a variable. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

options

This is a compound parameter and can contain any combination of the following items:


FullPath=yes/no

Yes = Include the item's full path in the list. No = include only the file's base name and extension.

IncludeFiles=yes/no

Yes = include files in the list. No = do not include files in the list.

IncludeFolders=yes/no

Yes = include folders in the list. No = do not include folders in the list.

SelectedOnly=yes/no

Yes = include only selected items in the list. No = include all items in the list.


Separate multiple items in a compound parameter with semicolons (;).

variable

The name of the variable where the list of items will be stored. If multiple items are selected, sizes will be separated by the global delimiter.

Example:

fmFileListToVar "FileList1" "FullPath=Yes;IncludeFiles=Yes; IncludeFolders=Yes;SelectedOnly=Yes" "[Files]"