Navigation
Purpose: |
Change the current directory for a connection. Note: The current directory can be determined by examining the connection's [ClientID.CurrentDir] variable. |
Category: |
Navigation |
Syntax: |
fmChangeDir "connection id" "path" connection id The name assigned to the connection you want to affect. The connection must have already been opened with fmConnectLocal or fmConnectRemote. path The path you wish to change to. If the connection is a local file system, then the directory must be a valid, existing Windows path. If the connection is a remote FTP server, then the directory must be a valid, existing path in the format required by the server. FTP servers are also case sensitive, so make you enter the path correctly. |
Example: |
fmChangeDir "Remote1" "/webspace/httpdocs/img" |
Purpose: |
Define a file mask/filter for a connection. A file mask is a string that specifies the type of file or files that will be visible to the connection. The mask may include multiple file types including wildcard characters. |
Category: |
Navigation |
Syntax: |
fmSetFileMask "connection id" "mask" connection id The name assigned to the connection you want to affect. The connection must have already been opened with fmConnectLocal or fmConnectRemote. mask The mask used to filter the types of files visible to the connection. The mask may include the standard file name wildcard characters ? and *. Separate multiple masks with semicolons (;). |
Example: |
The following will display all jpg files in the current directory: fmSetFileMask "Local1" "*.jpg" The following will display all jpg, png and gif files: fmSetFileMask "Local1" "*.jpg;*.png;*.gif" The following will display all files that begin with the letter "A": fmSetFileMask "Local1" "A*.*" |
Purpose: |
Sort the contents of a connection by name, type, date or size. Folders are always sorted at the top of the list and files at the bottom of the list. Sorting is most useful when used in conjunction with a visual File Browser and the Details view style, but it can also be used with the fmFileListToVar action. A user can also change the sort method by clicking on the file browser's list header. |
Category: |
Navigation |
Syntax: |
fmSetSortMethod "connection id" "method" "direction" connection id The name assigned to the connection you want to affect. The connection must have already been opened with fmConnectLocal or fmConnectRemote. method The item information to use for the sort. This can be one of the following: Name, Type, Date or Size. direction The sort direction can be either Ascending (A-Z) or Descending (Z-A). |
Example: |
fmSetSortMethod "FileList1" "Date" "Ascending" |
Purpose: |
Get a connection's current sort method and direction. |
Category: |
Navigation |
Syntax: |
fmGetSortMethod "connection id" "method variable" "direction variable" connection id The name assigned to the connection. The connection must have already been opened with fmConnectLocal or fmConnectRemote. method variable The name of the variable where the sort method will be stored. The sort methods are the same as those used for the fmSetSortMethod action. direction variable The name of the variable where the sort direction will be stored. The sort directions are the same as those used for the fmSetSortMethod action. |
Example: |
fmGetSortMethod "FileList1" "[SortMethod]" "[SortDir]" |
Purpose: |
Reload the current directory for a connection. In most cases, directories will refresh automatically when changes are detected, so this action should only be necessary in specific situations, such as when the file system is updated by another application. |
Category: |
Navigation |
Syntax: |
fmRefresh "connection id" connection id The name assigned to the connection. The connection must have already been opened with fmConnectLocal or fmConnectRemote. |
Example: |
fmRefresh "Remote1" |
Purpose: |
Set the root directory for a connection. The root directory is the first or top-most directory in the file system hierarchy. Much like a tree, the root is the starting point where all branches originate. When a file system connection is established, NeoFM/FTP automatically determines the default root directory. For example, the default root directory for a local connection is the Windows "Desktop". However, there are situations where it's advantageous to define a different root directory. For example, if you want to offer file management capabilities, but limit them to a specific folder to protect sensitive files elsewhere on the hard drive. Once the root directory is set, the connection will not allow navigation below that point, making it appear to the user that no other folders or drives exist below the new root. Setting the root directory only affects the specific NeoFM/FTP connection where it is applied. It has no effect on the actual file system, operating system or other applications. |
Category: |
Navigation |
Syntax: |
fmSetRootDir "connection id" "path" connection id The name assigned to the connection. The connection must have already been opened with fmConnectLocal or fmConnectRemote. path The path you wish to use as the new root directory. If the connection is a local file system, then the directory must be a valid, existing Windows path. If the connection is a remote FTP server, then the directory must be a valid, existing path in the format required by the server. FTP servers are also case sensitive, so make you enter the path correctly. To restore the original default root directory, you leave the path parameter empty. |
Example: |
Set the root directory to the C: drive: fmSetRootDir "FileList1" "C:\" Set the root directory to the publication's folder: fmSetRootDir "FileList1" "[PubDir]" Restore the original default root directory: fmSetRootDir "FileList1" "" |