Starting with version 3.7.1 of SBS-CASE Tools™ the File Services Toolkit is shipped, configured, installed and ready to use.  The only thing that needs to be done to use it, is to activate its resource in SBS-Pathfinder™.

 The File Services Toolkit allows the programmer to manipulate files on the SBS-Pathfinder™ Server host from the remote data collection device.  It will also allow the programmer to pull directory listings of file folders on the SBS-Pathfinder™ server as well as create file folders.  Its last function is to upload and convert a signature that was captured from the default “vector” format to a standard format such as BMP, JPG, GIF …  

 The SBS-CASE Tools™ programmer must import the transactions that are associated with the File Services Toolkit before they can make use of that function in the toolkit.  The names of the transactions are;

  • CopyFile.c_t
  • CreateDir.c_t
  • DeleteFile.c_t
  • ExportSigCap.c_t
  • MoveFile.c_t
  • RenameFile.c_t

Copy File

The CopyFile transaction is used to create a copy of a particular file on the SBS-Pathfinder™ server or any machine in its scope that it has privileges’ to.

The programmer must provide the name and the location of the file that is to be copied and where it is to be copied to.

 SourceName:

The Source Name is a required entry and it may be up to 64 characters in length.  Its contents must contain the value of a valid Windows file name.  This is the name of the file that is to be copied.  If the source file name is not found, the CopyFile transaction will fail.

 DestName:

The Destination Name is a required entry and it may be up to 64 characters in length.  Its contents must contain the value of a valid Windows file name.  When the file is copied to the destination file folder this entry will be the name of the file.  It may be the same name as the source name or it may be different. If the Destination file name is already present in the destination file folder, the CopyFile transaction will fail.

 SourceLocation:

The Source Location is an optional entry and it may be up to 255 characters in length.  If present, its contents must contain the value of a valid Windows file folder name.  This is the name of the file folder that the source file is to be copied from.  If a value is not entered, then the SBS-Pathfinder™ UserFiles folder will be the default file folder used to locate the source file. If the source location name is not found, the CopyFile transaction will fail.

 DestLocation:

The Destination Location is an optional entry and it may be up to 255 characters in length.  If present, its contents must contain the value of a valid Windows file folder name.  This is the name of the file folder that the source file is to be copied to.  If a value is not entered, then the SBS-Pathfinder™ UserFiles folder will be the default file folder used to copy the source file into. If the destination location file folder is not found, the CopyFile transaction will fail.

Delete File

The DeleteFile transaction is used to delete a particular file on the SBS-Pathfinder™ server or any machine in its scope that it has privileges’ to.

The programmer must provide the name and the location of the file that is to be deleted (sent to the recycle bin).

FileName:

The File Name is a required entry and it may be up to 64 characters in length.  Its contents must contain the value of a valid Windows file name.  This is the name of the file that is to be deleted.  If the File Name is not present in the file location then an error will NOT be raised.

 FileLocation:

The File Location is an optional entry and it may be up to 255 characters in length.  If present, its contents must contain the value of a valid Windows file folder name.  This is the name of the file folder that the file is to be deleted from.  If a value is not entered, then the SBS-Pathfinder™ UserFiles folder will be the default file folder used to locate the file to be deleted. If the file location path doesn’t exist, an error will be raised.

Export Signature Capture

The ExportSigCap transaction is used to upload (export) the signature from a remote data collection device to the SBS-Pathfinder™ Server (or any machine in its scope that it has privileges’ to) and convert the signature format from the default vector format to a more standard format.  Currently supported formats are bmp, png, jpeg, and gif.

The programmer must provide the signature, signature file name and the location of the signature that is to be exported.  An overwrite option is also provided to write over signatures that are already present.

 ExportName:

The Export Name is a required entry and it may be up to 64 characters in length.  Its contents must contain the value of a valid Windows file name.  This is the name of the file that the signature is to be stored in.  The extension that is given to the file will define the format that the signature is exported to.

 ExportLocation:

The Export Location is an optional entry and it may be up to 255 characters in length.  If present, its contents must contain the value of a valid Windows file folder name.  This is the name of the file folder that the signature is to be stored in.  If a value is not entered, then the SBS-Pathfinder™ UserFiles folder will be the default file folder used to store the signature file. If the export location does not exist, the ExportSigCap transaction will fail 

OverwriteYN:

The Overwrite is an optional entry and it may only contain the values Y (YES) or N (NO).  If an entry isn’t present then the default value of N will be used.  If a Y is present, then an error will not occur if the signature file is already present on the SBS-Pathfinder™ server.  If an N is entered or the default value of N is used, if the file is already present on the SBS-Pathfinder™ server, then an error will be raised and the existing file will not be overlaid.

Signature:

The contents of the CASE Tools variable that the vector format signature was captured into using the signature capture control. If no signature is present, the ExportSigCap transaction will fail.

Get Directory (File Folder) Listing

The GetDirListing transaction is used to return a directory listing of a particular file folder on the SBS-Pathfinder™ server or any machine in its scope that it has privileges’ to.  It will return the contents of the file folder into a file that the user has defined on the remote data collection device.  The defined file structure must match the result structure of the GetDirListing transaction.  The GetDirListing is used before most of the file manipulation commands so that you can verify what you intend to do will work before you execute that transaction

The programmer must provide the name of the file folder (and its path) as well as an optional filter.  Wild cards are allowable in the filter such as all text files *.TXT.   If the successful execution of this transaction returns no data then the programmer will receive a System.ErrorNumber of “NO DATA” and not “SUCCESS” or “FAILED”.

DirectoryPath:

The Directory Path of the file folder that is to be examined is a required entry and it may be up to 255 characters in length.  Its contents must contain the value of a valid Windows file folder name.  This is the name of the file folder that will be listed. If the Directory Path does not exist, the GetDirListing transaction will fail

OptionalFilter:

The filter is an optional entry and it may contain up to 64 characters in length.  Its contents must contain the value of a valid Windows rule that would be used in a Windows “DIR” command.

Move File

The MoveFile transaction is used to move a particular file on the SBS-Pathfinder™ server or any machine in its scope that it has privileges’ to, to a different file folder.  After successful execution of the MoveFile transaction, the Source File Folder path will no longer contain the file.  It will only be present in the destination path.privileges’ to.

The programmer must provide the name and the location of the file that is to be moved and where it is to be moved to.  The MoveFile does not provide the option of changing the file name on the move.

 FileName:

The File Name is a required entry and it may be up to 64 characters in length.  Its contents must contain the value of a valid Windows file name.  This is the name of the file that is to be moved. If the file name is not found or io the file is already in the destination path, the MoveFile transaction will fail.

 SourcePath:

The Source Path is an optional entry and it may be up to 255 characters in length.  If present, its contents must contain the value of a valid Windows file folder name.  This is the name of the file folder that the source file is to be moved from.  If a value is not entered, then the SBS-Pathfinder™ UserFiles folder will be the default file folder used to locate the file name to be moved. If the source path is not found, the MoveFile transaction will fail.

 DestinationPath:

The Destination Path is an optional entry and it may be up to 255 characters in length.  If present, its contents must contain the value of a valid Windows file folder name.  This is the name of the file folder that the source file is to be moved to.  If a value is not entered, then the SBS-Pathfinder™ UserFiles folder will be the default file folder used to move the file name to. If the destination path is not found, the MoveFile transaction will fail.

Rename File

he RenameFile transaction is used to rename a particular file on the SBS-Pathfinder™ server or any machine in its scope that it has privileges’ to.  After successful execution of the RenameFile transaction, the File Path will no longer contain the current file name.  It will only contain the new file name. 

The programmer must provide the current and new file name and the file path of the file that is to be renamed. 

 CurrentFileName:

The Current File Name is a required entry and it may be up to 64 characters in length.  Its contents must contain the value of a valid Windows file name.  This is the name of the file that is to be renamed. If the current file name is not found in the file path, the RenameFile transaction will fail.

 NewFileName:

The New File Name is a required entry and it may be up to 64 characters in length.  Its contents must contain the value of a valid Windows file name.  This is the new name of the file after it has been renamed. If the new file name is already in the file path, the RenameFile transaction will fail.

 FilePath:

The File Path is an optional entry and it may be up to 255 characters in length.  If present, its contents must contain the value of a valid Windows file folder name.  This is the name of the file folder that the current file name is located in.  If a value is not entered, then the SBS-Pathfinder™ UserFiles folder will be the default file folder used to locate the file name to be renamed. If the file path is not found, the RenameFile transaction will fail.