Files can only be removed from the queue when in an idle or paused
state. If you attempt to remove a file while the queue manager is in
the process of uploading or download files, the method will fail.
The file identifier can be obtained by several different methods,
including EnumFiles and GetStatus, which
provides information about the current file being processed in the
queue. Do not make any assumptions about the value of the identifier.
Although the value is guaranteed to be unique for the specified queue,
it is not guaranteed that file identifiers will be assigned in
sequential order.
If you call this method using a file name, the EnumFiles
method will be used to enumerate all remote file names which match and
remove them from the queue. File name matches are not case-sensitive,
even when matching against file names on servers which use
case-sensitive naming, such as UNIX based servers.