KB: SCCM error: “The directory is not empty”

Problem case:

A deployment is stalling at the step “Wiping volume [Drive Letter]”.

As seen below, smsts.log states that it fails to complete installation of the image, with the error: Installation of Image x in package [Package ID] failed to complete. The directory is not empty. Error: 80070091; Source: Windows.


Investigating the remaining files on the local drive gives us a clue that some files could not be deleted. The folder “Documents and Settings” was still visible on the local drive C after attempting to wipe the drive. A single file in the users documents called “SlideIT.exe “ was not deleted during the tasksequence step “Wiping volume C”.

Notice the whitespace (“ “) in the end of “SlideIT.exe “.

Note: As this deployment was a migration scenario using Hardlink, the drive is wiped (files deleted) and the disk not formatted completely.

If a single file is named with whitespace somewhere in the name, a regular delete command cannot delete the file and folders above hierarchy. Pending file operations or corrupted files could cause this error as well.


  1. Locate the undeleted files on the local drive while error message is still present
  2. Reboot using a SCCM boot image (Bootable device or PXE) to enter WinPE
  3. Quickly delete the issued files and folders before the error state occurs and before the file enter “in use state” using the following commands:
    1. Del /s [directory] – Deletes  folders and subfolders
    2. Rmdir /s [directory] if needed – Deletes an empty folder
    3. Restart deployment
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s