STG_E_INVALIDPARAMETER (0X80030057) on Hard Drives – 3 Fixes
This error pops up when Windows can't read or write a file due to a corrupt parameter. It's usually a permissions or path length issue.
1. File or Folder Permissions Locking You Out
This is the most common reason you'll see error 0X80030057. The file or folder you're trying to access has permission settings that block your user account. It happens a lot when you move files from another computer or an external drive that had different user accounts.
What you'll see: You try to copy, move, or delete a file. Windows gives you the error. Sometimes it shows the file size as 0 bytes in Properties, but the drive still shows space used.
- Right-click the file or folder that gives the error.
- Click Properties.
- Go to the Security tab. If you don't see this tab, the drive might be formatted as FAT32 – skip to Fix 2.
- Under Group or user names, look for your username. It should be there. If it's not, click Edit (you need admin rights).
- Click Add, type your username, and click Check Names to confirm it. Then click OK.
- Back in the permissions list, select your username and check the Full Control box under Allow.
- Click Apply, then OK. You should see a progress bar as Windows updates the permissions. If it hangs, you might need to take ownership first (steps below).
If you still get the error after that, take ownership:
- Right-click the file/folder > Properties > Security > Advanced.
- Next to Owner, click Change.
- Type your username, click Check Names, then OK.
- Check the box Replace owner on subcontainers and objects.
- Click Apply, then OK. After that, go back to the Security tab and give yourself Full Control again.
After taking ownership and setting permissions, retry your file operation. 9 times out of 10, this clears the error.
2. File Path Too Long (Over 260 Characters)
Windows has a hard limit of 260 characters for file paths – drive letter, colon, backslashes, folder names, file name, and extension all count. If you're past that, you'll get 0X80030057. This is especially common if you have deeply nested folders or files with long names on an external drive.
How to check: Right-click the file > Properties > General tab. Look at the Location field. Count the characters manually, or use a tool like Path Length Checker (freeware).
Fix it two ways:
Option A – Enable Long Paths in Windows 10/11 (build 1607+):
- Press Win + R, type
gpedit.msc(Pro/Enterprise only). If you have Home edition, skip to the registry method below. - Go to Computer Configuration > Administrative Templates > System > Filesystem.
- Double-click Enable Win32 long paths.
- Set it to Enabled, click OK.
- Restart your computer. After that, Windows will allow paths up to 32,767 characters.
For Windows Home users – Registry method:
- Press Win + R, type
regedit, press Enter. - Go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem. - Find the DWORD LongPathsEnabled. If it's not there, right-click in the right pane, choose New > DWORD (32-bit), name it
LongPathsEnabled. - Double-click it, set the value to
1(decimal). Click OK. - Close regedit and restart your PC. This setting usually takes effect immediately after reboot.
Option B – Shorten the path manually: Rename the file to something short like data.doc and move it to the root of the drive (C:\ or D:\) using the command prompt. Use robocopy with the /R:0 flag to avoid retry loops:
robocopy "E:\Long\Nested\Folder\Path" "E:\" "filename.ext" /R:0
Replace the paths with your actual source and destination.
3. Drive Corruption or File System Errors
If permissions and path length aren't the problem, the drive itself might have corruption. This often shows up after a bad shutdown, improper ejection of an external drive, or a failing hard drive. You'll usually see the error when trying to access multiple files, not just one.
Run a Check Disk scan:
- Open Command Prompt as administrator (right-click Start > Command Prompt (Admin) or Windows Terminal (Admin)).
- Type:
chkdsk D: /f /r– replaceD:with the drive letter giving you trouble. - Press Enter. If it's your system drive (C:), it'll ask to schedule the scan on next reboot. Type Y and restart.
- Let the scan run fully. For a 1TB drive, this can take 2-4 hours. Don't interrupt it.
- After it finishes, check the report. It'll tell you if bad sectors were found and fixed.
If chkdsk finds corruption but can't fix it: Use the /scan and /spotfix options on Windows 8 and later:
chkdsk D: /scan /spotfix
This is faster and targets only the bad spots.
Still broken? The drive might be physically failing. Back up your data immediately. Use a tool like CrystalDiskInfo to check the drive's SMART status. If you see yellow or red warnings (especially Reallocated Sectors or Current Pending Sector count), replace the drive. Don't mess with low-level formats or third-party tools – they can make it worse.
Quick-Reference Summary Table
| Cause | Fix | Time to Fix |
|---|---|---|
| Permissions / Ownership | Take ownership, grant Full Control | 5-10 minutes |
| Path too long (>260 chars) | Enable long paths in Group Policy or Registry; or shorten path manually | 10-15 minutes |
| Drive corruption / bad sectors | Run chkdsk /f /r or /scan /spotfix | 30 minutes to 4 hours |
Try these in order. I've seen permissions and path length cover about 80% of 0X80030057 cases. The remaining 20% are drive corruption issues. If none of these work, test the drive on another computer – if the error follows, the drive is dying.
Was this solution helpful?