Mass File Manipulation in SharePoint 2010
Written By: Knox Cameron -- 3/16/2011 --
(247) comments --
Categories: Document Management, Features, SharePoint 2010, SharePoint Foundation 2010
< Prev -
- Next >
| Become a paid author
SharePoint gives you a friendly, easy-to-use, web interface for uploading
files, editing their properties and content, and so on. However, sometimes you
need to perform "bulk" operations like moving a group of files to a different
folder or library, or a mass rename or selective delete. SharePoint does provide the
"manage content and structure" interface, but this can be slow and somewhat
unreliable, and is not available in a SharePoint Foundation / WSS-only
SharePoint provides a way to access the content of folders and document
libraries in a site as if they were stored on the disk of your computer. You
have probably used the simplest form of this, "explorer view" in a document
library, to manipulate files using Windows Explorer. But did you know that you
can also access files using the command line, and even write batch files, to
perform operations that would be time consuming or even impossible in the web
This tip will look at how to set this access up, including some of the common
issues that can stop it working. It will also provide some examples of how you
can use this capability to save time.
The starting point: Explorer view
In SharePoint 2007, if you browse to a document library, Explorer View will
normally be available from the Views drop-down at the top right.
SharePoint will attempt to open the Explorer View within the browser window,
in the same space as the normal documents view.
However, this is not possible in
Windows Vista or 7 when protected mode is enabled. In that case you will see
this message in the browser (note "Protected Mode: On" in the status bar):
You may then see a security warning:
If you click Allow, you will (finally) see a Windows Explorer open showing
the document library:
In SharePoint 2010, the views drop-down does not include an Explorer View
The option is still there but you have to dig further to find it:
- Select the Library tab on the ribbon
- Find the Open with Explorer button in the Connect & Export button group,
circled in the screenshot below
Depending on your setup, you may be prompted to login again, as you are now
different program on your computer to access SharePoint. You will
then see a Windows Explorer window showing the documents and folders in the
library, as if they were on a file share.
Notice that there is an extra folder called "Forms" which was not visible in
the web page view. This folder is hidden, so it should only show up if you have
configured Windows Explorer to show hidden files and folders. SharePoint (both
2007 and 2010) uses this folder to store the web pages which show views of the
library and other "internal" information. The best advice is: leave it alone!
Now you have a Windows Explorer window into the document library, you can use
many standard functions to manipulate the files. For example, you can:
- Highlight files in another Windows Explorer window and drag and drop to
copy them into the document library (or hold down the shift key to move
instead of copying the files)
- Highlight files in this window and drag and drop to copy them out of the
- Click on a file name to rename it (or select it and press F2)
However, there are significant limitations. Although it looks like Windows
Explorer, the documents are in SharePoint not on your hard disk or a file share.
For example, SharePoint has tighter restrictions on file names and you will get
an error if you attempt to copy a document into SharePoint with a name that is
too long or includes a character like "&":
If you right click a file, you will see typical Windows Explorer options like
move and copy, but no SharePoint functions like check in or publish. SharePoint
2001 included client software to let you do functions like that in Windows
Explorer, but these days you have to go back to the web browser or SharePoint
Designer. So if you have a set of files to import, you can drag and drop them
into Explorer View, but you will need to go back to the browser to enter
metadata, and check the files in if that is required by the document library.
Also, SharePoint does not support multi-user access to files like a file
server does. Don't expect to be able to store an Access database
in a document library and use it as a network database.
You can copy or move files between different document libraries or sites by
opening two explorer windows and dragging and dropping. However, note that the
files will be downloaded from the first library to your computer then uploaded
to the other library, not copied directly between them, so performance may be
slow. Also, SharePoint metadata will not be preserved unless it is saved in the
file (as it may be with Office documents for example) and only the current
version will be copied.
So, be cautious about using Explorer View when you are using SharePoint's
document management functionality. If it is available, a better option in that
case would be to use SharePoint's "Manage Content and Structure" interface.
Under the covers
Explorer view has been around for many years and multiple generations of
SharePoint and desktop software. A feature called "Web Folder Behaviors"
("WebFolders") was originally released with Internet Explorer 5.
WebFolders uses the
FrontPage RPC protocol, also used by Office applications
and SharePoint Designer to work with files in SharePoint.
When Windows XP was released some
years later, Microsoft provided the WebClient service. This uses the WebDAV (web distributed authoring and versioning) protocol,
an open and more general purpose protocol than FP RPC. However, WebFolders continued to be used in parallel. With Windows Vista,
the WebClient service was enhanced. For example, it now supports connections
over SSL (https).
Microsoft's web server software (IIS) has a WebDAV server feature, but
SharePoint has its own WebDAV server function built in and you should not enable IIS
WebDAV support on a SharePoint server.
With SharePoint 2010, Microsoft has completed the move away from WebFolders to the more
general purpose WebClient. This support is built into all modern Windows versions (XP and
above) but is typically not enabled by default on servers (see below for how to
do this). The advantage of the WebClient service is that it sits in the network
stack on the computer and allows applications to access files as if they were on
a file server. For example, even a simple application like Notepad can open a
text file in a SharePoint document library through the WebClient service.
Because the WebClient service sends the WebDAV commands are sent over standard http or https
connections to the SharePoint server, you can work with files on
SharePoint servers through the same proxy servers and connections you use with
browser, without requiring additional ports open on a firewall, or VPN access.
If you have transparent authentication configured, which logs you in
automatically to SharePoint using network credentials, then Explorer view will
also be able to log in automatically. If you log into SharePoint using a login
form, Explorer view may be able to use the credentials so you don't have to
login again. Otherwise, you may be prompted to login, or may even be unable to
use Explorer view.
< Prev -
- Next >