2

I have exported a document library from Farm A as follow:-

Export-SPWeb -Identity "http://famrA/***" -ItemUrl "Our Library" -Path "c:\16.cmp"     -nofilecompression  -IncludeVersions All -IncludeUserSecurity -Force -Verbose

Now this command has generated a folder named 16.cmp which contain many files.

Now I moved the folder to the C drive inside FarmB. then I wanted to import the document library inside the new farm using this command:-

Import-SPWeb http://farmB/**** –Path "c:\16.cmp" -IncludeUserSecurity –Verbose

but I got this error:-

Import-SPWeb : The file c:\16.cmp does not exist.

So can anyone advice on this, please? now the Export did not create a file named 16.cmp, But it created a folder named 16.cmp ...so not sure how to fix this ??

3

This issue occurs in case you are using -NoFileCompression parameter in the Export-SPWeb cmdlet.

In this case, the cmdlet will export the files with no compression in a Folder instead of one file filename.cmp as shown below

enter image description here

And if you tried to import it, you will get The file c:\16.cmp does not exist because it's not file, it's a folder called 16.cmp


So to perform Import-SPWeb from NoFileCompression folder, you must also use the same NoFileCompression parameter in the Import-SPWeb cmdlet as shown below:

enter image description here

P.S: In your case, change Qassas folder to your folder name 16.cmp

The final cmdlet based on your entries

Import-SPWeb http://farmB/**** –Path "c:\16.cmp" -NoFileCompression -IncludeUserSecurity –Verbose
  • 1
    thanks for the reply... will try this and let u know if it work for me – john Gu Aug 27 '17 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.