> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IXtfDeployCallback::OnDeployExtraFileRemoved

> IXtfDeployCallback::OnDeployExtraFileRemoved

# IXtfDeployCallback::OnDeployExtraFileRemoved

Callback invoked to report that an extra file on the console has been removed.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
public:
HRESULT OnDeployExtraFileRemoved(
         LPCWSTR pszFilePath
)  
```

<a id="parametersSection" />

### Parameters

*pszFilePath*\
Type: LPCWSTR

The path to the extra file that was removed.

<a id="retvalSection" />

### Return value

Type: HRESULT

Returns `S_OK` to continue deployment, or an HRESULT error code to cancel the deployment.

<a id="remarksSection" />

## Remarks

This callback is invoked only if the [IXtfApplicationClient::Deploy](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/deploy-ixtfapplicationclient-xtfapplication-xbox-microsoft-m) method is invoked with the `fRemoveExtraFiles` parameter set to TRUE, indicating that the deployment system should remove any file it finds on the console that is not on the deploying PC. This callback is called once for each extra file removed. For more information about how files are evaluated and when callbacks are invoked during the deployment process, see [IXtfDeployCallback Interface](/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/ixtfdeploycallback-xtfapplication-xbox-microsoft-t).

As with the other callbacks for `IXtfDeployCallback`, the deployment process continues if this callback returns `S_OK`. If this callback returns any `HRESULT` error code, then the deployment process is canceled immediately. Files that have already been transferred or deleted remain as they are, and partially transferred files are closed in their truncated form. Another deployment must be completed to ensure that all files on the console are complete and up to date.

<a id="requirementsSectoin" />

## Requirements

**Header:** xtfapplication.h

**Library:** xtfapplication.lib

**Supported platforms:** Windows (for XBOX console tools)

## See also

[IXtfDeployCallback Interface](/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/ixtfdeploycallback-xtfapplication-xbox-microsoft-t)\
[XtfApplication](/reference/tools/xtf/xtfapplication/xtfapplication-xbox-microsoft-n)


## Related topics

- [IXtfDeployCallback::OnDeployExtraFileDetected](/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeployextrafiledetected-ixtfdeploycallback-xtfapplication-x.md)
- [IXtfDeployCallback::OnDeployFileProgress](/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeployfileprogress-ixtfdeploycallback-xtfapplication-xbox-w.md)
- [IXtfDeployCallback::OnDeployMetrics method](/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeploymetrics-ixtfdeploycallback-xtfapplication-xbox-window.md)
- [IXtfDeployCallback::OnDeployChangeEvaluation](/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeploychangeevaluation-ixtfdeploycallback-xtfapplication-xb.md)
- [IXtfDeployCallback::OnDeployInitialized Method](/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeployinitialized-ixtfdeploycallback-xtfapplication-xbox-wi.md)
