Here’s how to move the Windows Server 2003 Inetpub directory from default directory c:\Inetpub to another drive, d:\Inetpub in this example.
1. From a command prompt type:
xcopy c:\inetpub d:\inetpub /O /X /E /H /K
This will copy the IIS Inetpub directory, it’s contents, and the file permissions to the new drive. See KB 323007 for details on how to use xcopy.exe to maintain file and directory permissions.
2. In IIS manager, view the properties of the default web site. On the Home Directory tab, change the path from c:\inetpub to d:\inetpub. Make this change for each web site the server hosts.
3. Run iisreset from a command prompt to restart the web server services.
4. Remove the old c:\inetpub directory
That’s it!
{ 3 comments… read them below or add one }
Can I just Delete this file Inetpub file?
Can I delete this file without anything else going wrong, or is it an important file on my 2002 XP Pro. It seems to be an incomplete file with empty folders.
Thanks
You will have edit IIS Metabase to reflect the new inetpub directory. Removing the old inetpub directory will recreate it with each IIS recycle.