Previous Topic: ApplyDirectoryNext Topic: ApplyFunction


ApplyFile

ApplyFile

Applies a file from the source to the destination computer. This command takes two or three parameters. The first parameter is the file name and is a string value. The second parameter is one of the following overwrite constants or a new file path. There are three constants which indicate the overwrite method: ALWAYS, NEWER or NEVER. If the overwrite constant is omitted, the default NEWER or the user selected overwrite method is applied. If the second parameter is a new file path, the file <file name> is applied to <new file name>. An optional overwrite method is allowed as well. This command recognizes the asterisk (*) as a wildcard. Only files that were stored can be applied. When moving, if the storing path contains a wildcard string, do not include the wildcard in the moving path.

First parameter:

The File name (string value)

Second parameter:

The new File name (string value)

Third parameter:

The overwrite method (string value)

Usage:
ApplyFile(<File name>, [overwrite method]); or
ApplyFile(<File name>, <new File name>, [overwrite method]);
Example:
ApplyFile("c:\\temp\\file.txt");
/*Wildcard example*/
ApplyFile("c:\\My Documents\\*.txt", "c:\\New Path\\Word Documents", ALWAYS);