Question: Following is my code (Console Application) which I am using to copy a file from a site collection to anohter. When I run the code again it says a file with name .. already exists in Style library but I cannot see the file when I refresh the page. and I think something is wrong.

```
using (SPSite site = new SPSite("http://root.contoso.com/"))
{
    using(SPWeb web = site.OpenWeb())
    {
       SPFileCollection collFile= web.Lists["Style Library"].RootFolder.Files;
       using (SPSite s = new SPSite("http://root.contoso.com/sites/test"))
       {
           using (SPWeb w = s.OpenWeb())
           {
               w.AllowUnsafeUpdates = true;
               SPList l = w.Lists["Style Library"];
               foreach (SPFile f in collFile)
               {
                   SPFile u = l.RootFolder.Files.Add(l.RootFolder.Url + "/" + f.Name, f.OpenBinary(), true);
                    l.RootFolder.Update();
                    l.Update();
                    w.Update();
              }
             w.AllowUnsafeUpdates = false;
           }
       }
   }
}

```

Answer: 
You might not have permissiosns to see that file.
You should also add a check for file existence like :

```
SPFile u = l.RootFolder.Files.Add(l.RootFolder.Url + "/" + f.Name, f.OpenBinary(), true);
 if (l.Exists)
 {
    l.RootFolder.Update();
    l.Update();
    w.Update();
}

```
Style library is system library so pretty much sure both site collection having same amount of files with same name. that's why you facing the issue.

Here is, power shell script on MSFT technet gallery which copy a library from one site to other. 
<http://gallery.technet.microsoft.com/Copy-all-SharePoint-Files-0999c53f>.

One thing i want to ask, why you want to copy from style library to other site collection library?