Synopsis
FCTRLSVR.EXE {/DELETE | /RENAME | /MKDIR | /RMDIR} /F:FilePathName [/FN:FileName] [/UN:UserName] [/LG:LoginGroup] [/RC:nn /RI:nnnn]
Description
The FCTRLSVR.EXE command operates files or directories on the server. For file operations, the command deletes or renames files. For directory operations, the command creates or deletes directories.
Local files, files that use the Windows shared directory, and files on the FTP server can be operated by this command.
- You can do it even on the remote server without having Systemwalker Operation Manager installed.
Parameters
/DELETE
Deletes a file.
/RENAME
Renames a file.
/MKDIR
Creates a directory.
/RMDIR
Deletes a directory.
/F:FilePathName
Specifies a path name of the file or directory to be operated. You can use a wildcard for this file name only when using with the /DELETE or /RENAME parameter.
Use one of the following methods to specify FilePathName in the URL format. FilePathName must be no longer than 255 characters, and enclose it in double quotation marks if a space character is contained.
Specify a path including the drive name.
Specify the path name of desired file directly after "file://" string.
file://C:\DATABASE\DATABASE.DB
Specify a path in the format "\\computer name\share name". For a computer name, specify a Windows-based computer name within 15 alphanumeric characters. Specify a share name within 80 bytes.
Specify the path name of desired file directly after "file://" string.
file://\\foo\SHARE\DATABASE\DATABASE.DB
Specify a path name to the FTP server.
The path name can be specified with a full path name or relative path name from the current directory in logging in with FTP.
Specify the path name in the format of "server name/path name of desired file" directly after "ftp://" string.
ftp://foo.bar.com//Usr/DataBase/DataBase.DB
ftp://foo.bar.com/DataBase/DataBase.DB
/FN:FileName
Specifies the new file name you change to. You can use a wildcard for this parameter. Specify a file name in FileName within 255 characters, and enclose it in double quotation marks if a space character is contained.
This parameter is valid only when the /RENAME parameter is specified.
/UN:UserName
Specifies a user name to be used to access the file or directory specified with FilePathName.
The user name in UserName must be set in the password management book in advance. If a space character is contained in the user name, enclose it in double quotation marks.
If FilePathName is specified using a local drive path, this parameter's specification is ignored.
However, if the UNC method or path on the FTP server is specified, be sure to specify this parameter.
If the UNC method is used, specify UserName in either "domain name\user name" or "server name\user name" format. The domain name or server name must be no longer than 15 alphanumeric characters, and the user name must be no longer than 20 characters.
When specifying a path on the FTP server, "domain name\user name" cannot be specified. Specify the user registered as "user name@domain name" in the password management book, or the local account.
If a path on the FTP server is specified, UserName must be specified using up to 20 alphanumeric characters.
/LG:LoginGroup
Specifies a login definition name used to manage the password management book. LoginGroup must be no longer than 256 characters, and enclose it in double quotation marks if a space character is contained.
If the /UN parameter is specified, be sure to specify this parameter.
/RC:nn
Specifies the retry count in case an error occurs in file operation.
Specify an integer value between 0 and 99 for nn. Setting any other value results in an error. If omitted, no retry is performed.
/RI:nnnn
Specifies the retry interval in case an error occurs.
Specify an integer value between 0 and 9999 (in seconds) for nnnn. Setting any other value results in an error. The default value is 0.
This parameter is valid if 1 or a greater value is specified to nn in the /RC parameter.
Return Values
Return value | Meaning |
---|---|
0 | Completed |
Value other than 0 | Abended |
Command Location
Systemwalker Operation Manager installation directory\MpWalker.JM\bin
Example
In this example, the local file "c:\database\master\database.db" on the server is renamed to "database_backup.db". If renaming fails, retry is performed up to three times at an interval of 60 seconds.
FCTRLSVR.EXE /RENAME /F:file://c:\database\master\database.db /FN:database_backup.db /RC:3 /RI:60
Execution Results/Output Format
After the command has been through processing, the information at command completion is output to the standard output.
The contents to be output are shown below.
[Process start time] MM-DD-YYYY HH:MM:SS [Server host/User name] Server host name/user name (*) [Retry count] Number of retries performed (*) [Error] Error message (*) [File operation type] File operations/Directory name New file name (**)(***) [Retry count] Number of retries performed (**) [Error] Error message (**) [Process end time] MM-DD-YYYY HH:MM:SS
This information is output if the /UN parameter is specified.
If a wildcard is used, the information of each file is also output.
The new file name you changed to is output only when the /RENAME parameter is specified.
In [Error], "None" is output when the command completed successfully. A message is output if the command is canceled or failed. For details on the messages, see the Systemwalker Operation Manager Message Guide.
In [File operation type], any of "Delete file", "Rename file", "Create directory", or "Delete directory" is output.
If an error occurs before performing file operations, a message is output in the following format:
[Process start time] MM-DD-YYYY HH:MM:SS [Command error] Error message [Process end time] MM-DD-YYYY HH:MM:SS
For details on the messages, see the Systemwalker Operation Manager Message Guide.
Cautions
The Task Link service must be already working on the server side when you use this command.
Prior to running this command, you need to configure the password management book by using the password management command. See "9.3.1 LGMANAGE.EXE Password Management Command" or further details.
If you use this command by specifying the UNC method, you must use the Windows network share method. Therefore, be sure to use the same information (user name/password) when you try to connect from/to the same server simultaneously, using the Task Link command or other application (such as Explorer).
If the command is executed using the different authentication information by different users, it results in a connection error.
The FTP servers and files available for file operations by specifying a path on it are limited to those on which the execution results of "DIR" command are displayed in the following format (with permission, number of links, owner, group, size, date, time, and file name are listed in this order, in alphanumerical notation).
-rw-rw-r-- 1 xxxxx xxxxxx 605877 Dec 19 18:44 xxxxx.xxx -rw-rw-r-- 1 xxxxx xxxxxx 560661 Dec 19 18:59 xxxxx.xxx drwx------ 4 xxxxx xxxxx 96 Jan 20 1998 xxxxx -rw-rw-r-- 1 xxxxx xxxxx 6042 Jan 25 13:38 xxxxxxxxxxx -rw-rw-r-- 1 xxxxx xxxxx 5433 Feb 3 17:11 xxxxx.xxx -rw-rw-r-- 1 xxxxx xxxxx 2155 Feb 3 17:35 xxxxx.xxx -rw-rw-r-- 1 xxxxx xxxxx 3090 Feb 1 20:13 xxxxx.xxx
See "9.1.2 FCOPYSVR.EXE File Transfer Command" or how to verify whether or not the path on the FTP server can be specified.
When using a wildcard for the file name specified to the /F parameter, note the following:
The number of files to be processed at a time should be 500 or less, including the files to be processed by other Server Task Link commands.
If using a wildcard to specify a file name in a parameter, it is recommended to use a wildcard (asterisk only) for the entire file name. If using a wildcard for a part of the file name, confirm if the file you operated has the expected file name beforehand.
The size per file should be 2GB or less.