ResourceCopy is a command-line tool and C++ API for performing batch file operations like copying, transferring, and deleting files and directories. It is designed for developers working with Source engine projects, modding, or any workflow that requires fast and flexible file management.
To install ResourceCopy, follow these steps:
- Start with a clean copy of the Source SDK 2013 source code (works both for SP & MP).
- Drag and drop the contents of this repository into your SDK source directory.
- Overwrite any existing files when prompted.
- Regenerate the Visual Studio solution files (e.g., by running
createallprojects.bat). - Open the solution in Visual Studio and compile it. The
resourcecopy.exeexecutable will be built and ready to use.
- Recursive and shallow directory scanning
- Support for wildcards (
*) and extension filters (e.g.,*.vtf) - Batch copy, transfer, and delete operations
- Multithreading support for faster processing
- Reports and logging (operation reports, error reports, hardware report)
- Safe deletion (
-safemode prevents overwriting or deleting important files) - Utilities for quick checks: folder size, drive free space, file size
- Print directory contents with filters
You can use CResourceCopy as a C++ API for integration into tools or SDK projects:
-
Single File Operations:
CopyFileTo,TransferFileTo,DeleteFileIn,CreateDir,DirExist,FileExist,DeleteEmptyFolder,IsWritable -
Batch File Operations (multithreaded, supports wildcards):
CopyDirTo,TransferDirTo,DeleteDirRecursive -
Sanity Checks:
GetFileSizeFast,GetDriveFreeSpace,GetFolderSize -
Reports:
GenerateGlobalOperationReport,GenerateErrorReport,GenerateHardwareReport -
Configuration:
SetThreads,SetVerboseSpewMode,SetNormalSpewMode,SetQuietSpewMode
Example usage in C++:
#include "cresourcecopy.h"
CResourceCopy* pResourceCopy = new CResourceCopy();
pResourceCopy->SetQuietSpewMode();
pResourceCopy->CopyDirTo("C:\\source_dir\\*", "C:\\destination_dir", true, true);
pResourceCopy->GenerateGlobalOperationReport();
delete g_pResourceCopy;- Steam: Profile Link
- Twitter/X: @47Z14
- Discord:
carlossuarez7285