Medialon MxMs' Help
Name: Medialon FilesManagement
Version: 6.7.2
Available for: Manager V7 and Manager V6 (Lite & Pro), Showmaster (Mini, ST, Pro, LE, XS & iPro)
Limitation In: Showmaster: commands and variables marked with * are not available
Device Brand: Medialon
Positrack Compatible: No
Resources type: None

Overview

Note: In Showmaster, the local disk access is restricted to a folder called “UserData”, located in the project folder, and the access to folders on the network is restricted to the folders shared without login and password.

FilesManagement MxM provides a simple way to copy, move or erase any kind of files on hard disk.

It also provides commands for reading and writing files.

The directory where mxmFilesManagement works can be on the local disk or on any accessible disk over the network.

Directories can also be created and their contents can be listed.

A special command lets you change the attribute of files (like their readonly flag).

A serie of commands is provided for manipulating strings, for the purpose of saving and sorting, arrangement of strings in blocks, refinding of strings from blocks. For example, these commands are practical for managing and saving tables of ascii text strings.

Special commands are provided for managing INI files: ini files are very practical for creating simple database files.

They contains sections and items. Folowing is an example of a simple INI file called “Addresses.INI” where names of people are into sections and their address are in items.

[Jack Ripper]
Address = Knife street 13
City = Manchester
Zip code = 123456
[Maria Rabbit]
Address = Carrot street 4
City = New York
Zip code = 654321
[César Escartefigue]
Address = 5 rue des Pacoulins
City = Manosque
Zip code = 010203

In this example, you can read back the address of Maria Rabbit into a variable called Adr with the FilesManagement command: Read items from section ( “Addresses.INI”, “Maria Rabbit”, “Address”, Adr).

Other commands let you create new sections and items.

You can also list all the sections of a file and all the items of a section. With mxmFilesManagement, you can also monitor changes in a folder ( * not available in Showmaster).

WARNING: the monitor command checks for changes in the folder specified AND into the sub-folders. So if there is a big quantity of files in these folders and subfolders, the refresh of monitoring files list can be very slowed down.

MxM Installation

No special installation required

Device Setup

No setup dialog box at creation

Device Commands

The commands marked with * are not available in Showmaster.

Set current directory

Set the current working directory.

Get subdirectories list

Get the list of the sub-directories present in the current directory.

Usage: The return variable is a list of strings.

It can be the ‘text’ property of a list object in a Manager or Display Controller user-screen.

Get fileslist

Get the list of files present in the current directory.

Usage: The return variable is a list of strings.

It can be the ‘text’ property of a list object in a Manager or Display Controller user-screen.

Copy file

Copy a file from a directory to another directory.

Move/rename file or directory

Move a file from a directory to another directory.

Usage: this command is called “Move/rename” because if you specify a different directory for destination, it is a move and if you specify the same directory as the source, it is a renaming. This command apply to directories, but in this case it only renames.

WARNING: if the destination file exists, the function fails, you must call “delete file” then “move file” in that case.

Delete file

Delete a file from the current directory.

Write data to file

Write a string in a file.

Usage: If the file does not exist, it is created.

Usage: If data type is set to ‘Binary’, the content of the “Data” variable is decoded using the LowLevelCommunicator binary format (“!XX” where XX is the hexadecimal value of the byte) before it is written into the file.

If the file exists, its previous contents is erased and replaced with the new string, unless ‘Append’ file mode is used.

Read Data from File

Read the contents of a file into a string.

Usage: If data type is set to ‘Binary’, the content of the file is encoded using the LowLevelCommunicator binary format (“!XX” where XX is the hexadecimal value of the byte) before it is returned into “Data” variable.

Disk Free*

Return the available free space of a disk.

File size

Return the size of a file.

Force create directories

Create a new directory in the current directory.

Usage: Multiple path can be specified, path like Dir1\Dir2\Dir3 are allowed.Relative path (Dir1\Dir2) or full path (C:\Dir1\Dir2) can be used.

Read sections from ini

List all the sections of the specified INI file.

Usage: The return variable is a list of strings.

It can be the ‘text’ property of a list and the sections names can then be accessed with the list control commands of Manager or Display Controller.

Read items from section

List all the items of the specified section of a INI file.

Usage: The return variable is a list of strings.

It can be the ‘text’ property of a list and the items names can then be accessed with the list control commands of Manager or Display Controller.

Read item value

Read the value of the specified item.

Return item value [String] Variable that will contain the value of the item in return.

Write item value

Write the value of the specified item.

Usage: If the INI file does not exist, it is created.

If the section does not exist, it is created. If the item does not exist, it is created, otherwise its value is changed to the new value.

Erase section

Remove the specified section from the ini file.

Set file attributes

Change the attributes of the specified file.

Usage: Wildcards are allowed: for example, . will change the attributes of all the files in the current directory, *.txt will change the attributes of all the text files in the current directory. Useful when files are copied from a Cd-Rom where they have the read-only flag.

Open file dialog *

Open the default browser window dialog.

Usage: If the user selects a file, the name of the file is contained in the variable CurrentFile.

If the user choose Cancel, the variable CurrentFile is empty.

WARNING: this dialog is modal, that means that as long as the dialog is opened, no other command can be performed by the same device (but others devices works, even other FilesManagement devices).

Split file path

Split the name of a file into 3 parts: directory, file name, and extension.

Directory monitoring *

Specify the directory to watch. All changes in that directory will be monitored in the monitoring variables ot this device (see variables).

Clear modified files list *

Clear all the names listed in the MonitoringModifiedFiles variable.

Clear new files list *

Clear all the names listed in the MonitoringNewFiles variable.

Clear deleted files list *

Clear all the names listed in the MonitoringDeletedFiles variable.

Copy/move directory

Copy or move the files specified from a directory and from its subdirectory to another directory.

Usage: If destination directories don’t exist, they are created.

If the default filter . is not used, only the specified files are copied. When the action is MOVE, all the files specified are moved and the left empty directories of the source are removed.

Delete directory

Delete the directory and all its files and subdirectories.

WARNING: If the two enums are set to NO, all the files are erased without confirmation and without undo. By default, the enums are set to YES.

Get file information

retrieve informations from a file.

NOTE: If the info is not in the file the string returns “Info not found”, if the files doest not exist the string returns “File not found”.

Erase item from section

Erase totally the specified item.

Open Connection

Open a connection to a shared folder path on a remote computer.

NOTE: This command must be called prior to any file or folder command on a shared folder.

Close Connection

Close a connection to a shared folder path on a remote computer.

Device Variables

CurrentDirectory

[String] Current directory.

LastError

[Enum] Error message (result of the last command).

CommandStatus

[Enum] Satus of the running command.

Usage: This command was useful in the version 1.0 of Manager or Display Controller, in order to be sure that the command has finished, but now it is obsolete because the task calling this command will be blocked the time the command will be done (and not the other tasks).

WindowsDirectory *

[String] Current Windows (OS) directory.

SystemDirectory *

[String] Current System (OS) directory.

ProjectsDirectory *

[String] Manager or Display Controller current projects directory.

CurrentFile *

[String] The file selected by the “Open file dialog” command. The string is empty if the user closes the dialog by clicking on the cancel button.

MonitoringModifiedFiles *

[String] List of all the files modified in the monitored directory.

MonitoringNewFiles *

[String] List of all the new files in the monitored directory.

MonitoringDeletedFiles *

[String] List of all the files deleted in the monitored directory.

MonitoringStatus *

[Enum] Status of the monitoring command.

Revisions

V 1.0.1

V 1.1.0

V 1.1.1

V 1.1.2

V 6.0.0

V 6.0.1

V 6.0.2

V 6.0.3

V 6.0.4

V 6.1.0

V 6.1.1

V 6.2.0

V 6.2.1

V 6.2.2

V 6.3.0

V 6.3.1

V 6.7.0