Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Moving Existing (Non Doc Library) Documents into Document Library

  Asked By: Umesh    Date: May 23    Category: Sharepoint    Views: 21511

Any search I've done for this I've come up with Migrating from one Doc
Library to Another. That's not what I'm trying to do.

What I'm trying to do is:
We have regular shared folders/file system which we are starting to
move into a SharePoint document library. In the past I've just been
connecting to the Doc Library by mapping it as a drive and copying the
files over. This pretty much works - because there is no metadata or
versioning to retain.

The problem is:
Filenames with characters like '& % #' (is there a way to allow files
with these in the DL??)
MDB files, or other restricted files strewed about the folders.

In the end I have no problem with either renaming the filename or not
copying over the restricted files. But the pain in the but of it is
that when I copy over a large amount of files - it completely stops
the process whenever it runs into one of these problems.

I was wondering if there was a sort of streamline method that this
could be done - that could either auto-rename the files or show a
report at the end of the copy explaining which files weren't copied over?

Share: 

 

10 Answers Found

 
Answer #1    Answered By: Christian Waters     Answered On: May 23

Take a look at Davcopy. It's a command line tool that copies documents
to SharePoint libraries. It may handle the errors in a way that better
suits what you're trying to do.

 
Answer #2    Answered By: Virendar Bahudur     Answered On: May 23

I have heard of davcopy before, sorry for not thinking of that first.

Sadly - files  that have an & or % in the name don't only not copy, but
they stop the whole process  giving the error:
'The remote server returned an error: (400) Bad Request'

I find it hard to believe that you just can't have & or # in a
filename on sharepoint  (it really stinks because some one of our dept.
standard naming format, includes a % in it) Just one more cry to see
if there's a workaround for that..

But as I figure that's just a lost cause, can anyone think of a
different way to copy  of files and just get an error log for files
that didn't copy?

I'm guessing if noone else has found a solution - I may just do big
copy of all the files - then do a batch rename - then davcopy to the DL.

 
Answer #3    Answered By: Sierra Beck     Answered On: May 23

First, let's be clear, this is not a SharePoint issue, it's an HTTP
standard issue. I don't think you're able to upload files  with & or %
in their names to Apache or Websphere or anything. Consider the issue
with &, in a URL that signals a parameter (actually a parameter after
the first one). Now let's see how a web server would handle a name with
& in it. Should it consider that as part of the filename, or a
parameter? % has the same problem, that's used to denote special
characters. You need something to "HTMLEncode" the filenames. That is
a standard method  in .net, so it should be very easy to write. Heck, I
can't program my way out of a wet paper bag and I could probably write
it.

 
Answer #4    Answered By: Elisabeth Walsh     Answered On: May 23

I just emailed the author of Davcopy and he said he is planning to add
the "HTMLEncode" functionality to the next version of Davcopy, so this
issue will go away then. He also asked me to mention there is no ETA at
this point.

 
Answer #5    Answered By: Bhavesh Doshi     Answered On: May 23

If I have any luck finding a good tool to batch HTMLEncode or go
through writing one myself - I will post back.

 
Answer #6    Answered By: Elisa Santos     Answered On: May 23

Have a look at my SPIEFolder tool at http://www.codeplex.com/SPIEFolder

As an option.

I should probably look at using HTMLEncode to rename the file name when
I do my import as well.



 
Answer #7    Answered By: Tatiana Houston     Answered On: May 23

Also, take a look at
support.microsoft.com/default.aspx if you
haven't already read it...

 
Answer #8    Answered By: Arlene Hodge     Answered On: May 23

I'm no expert, but I believe that the reason for the limitation on characters,
is because in SharePoint each file uploaded also has a link to the file created.
These are special characters  for a URL, so it is my understanding that any of
those characters are going to be a limitation. We ran into a similar issue, and
simply changed the naming structure of our files. I don't know how easy this
would be for you to do though.

 
Answer #9    Answered By: Jolene Sandoval     Answered On: May 23

This info may be helpful:
Windows supports long filenames (up to 255 characters) and these can contain any
characters apart from the following: ? [ ] / \ = + < > : ; " , However, the
document libraries in Windows SharePoint Services have a subtly different
restricted set: ? " # % & * : < > \ { | } ~ and so any filenames with any of
these characters  will be rejected as you try to upload them into SharePoint. The
obvious one is the "&" which is a quite legitimate and quite common character in
filenames but can't be uploaded into SharePoint. There is no fix - you just have
to rename your files. Additionally, the following characters may not be used in
Windows SharePoint Services site NAMES: \ / : * ? " < > | # { } % & " and site
names may not START with the _(underscore) character. The use of the parentheses
( ) should be restricted. Althought allowed for Sharepoint naming, hyperlinks
containing these characters may fail.

 
Answer #10    Answered By: Chelsey Watts     Answered On: May 23

Here is the way we followed:
First we have written a small program (or one can use vbscript) to recursively
rename the files  with those special characters.
Then we have copied the files using explorer view.

 

Related Topics:



Tagged:            

 

Related Post