A small, read-only PowerShell utility that checks whether .package and .ts4script files are stored within the Sims 4 Mods folder depth limits.
| File type | Maximum subfolder depth |
|---|---|
.package |
5 |
.ts4script |
1 |
Depth is counted from the Mods directory. A file directly inside Mods has a depth of 0.
- Windows PowerShell 5.1 or later
- The Sims 4 Mods directory
No external modules are required.
Run the checker using the default Sims 4 Mods directory:
.\Test-Sims4Mods.ps1Specify a custom Mods directory:
.\Test-Sims4Mods.ps1 -ModsPath 'D:\Games\The Sims 4\Mods'Display all supported mod files, including files that pass validation:
.\Test-Sims4Mods.ps1 -ShowAllView the built-in help:
Get-Help .\Test-Sims4Mods.ps1 -Full| Code | Meaning |
|---|---|
0 |
No folder-depth violations found |
1 |
Mods directory not found |
2 |
One or more files exceed the depth limit |
- Checks
.packageand.ts4scriptfiles only. - Reports nested directories named
Modsas warnings. - Does not validate mod compatibility, dependencies, duplicates, or game-version support.
- Does not extract archives or modify files.
- A successful check only confirms folder depth, not that the game will load every mod.
This script is read-only. It does not move, rename, delete, or modify files in the Mods directory.
The script follows the general conventions in the PoshCode PowerShell Practice and Style Guide, including approved verb naming, PascalCase identifiers, comment-based help, explicit parameter types, and consistent formatting.