Project Description
Copy files and sub folders from file system to SharePoint 2010 document library

  1. Subfolders are supported; root site and sub site are supported
  2. Document libraries are created automatically if no document library is specified;
  3. The "Created" and "Modified" date of the files and the folders will be changed to the one in the file system
  4. Allow to transfer "active" or "inactive" files. If a file is not modified in recent "N" months, it is treated as "inactive". This setting "N" is specified in the .config file.
  5. No existing file in the SharePoint site will be overwritten or change or delete
  6. All invalid characters in file name and folder name will be replaced by '_'
  7. Don't forget to turn off "versioning" feature and "content approval" workflow of the document library
  8. Three log files are created in the specified log folder. By default, they will be put into "c:\temp"
  9. By default, only files less than 50MB are supported (you can change it through the .config file, IIS and SharePoint settings)
  10. "Title" column is updated with the original file name
  11. "FileNameUniqueID" in the config file allow us to use unique ID to replace the original file name (to reduce the full URL length of the migrated file, to avoid the 260 characters limitation of SharePoint)
  1. File permissions and folder permissions can be replicated to SharePoint
  2. If all permissions of a folder (or a file) inherit rights from its parent level, then its permission will not be copied to SharePoint
  3. The SharePoint server and the machine which hosts source file folder need to be in the same domain.
  4. If the item in SharePoint document library already got unique permission (not inherit permission from parent level), it will be skipped
  1. Need to run from the SharePoint server locally as administrator. The current user also needs to be site collection administrator of the site collection.
  2. SharePoint 2010 only
  3. Please change "Blocked File Types" of the web application before file migrating, and change the "excludeFileTypes" settings in FileMigrateConsole.exe.config
  4. Please change the "logpath" settings in FileMigrateConsole.exe.config to change the log file location
  5. Please change the "FileSizeLimit" settings in FileMigrateConsole.exe.config, and configure SharePoint to allow huge file uploading (if the file size is more than 50MB)


Before migrating the files, recommend to read this article, and discuss with business users about it!  Folders are evil......

From version 20111017,
Command sample 1: FileMigrateConsole.exe all '\\remoteServer\d$\folder1\subfolder1' 'http://SharePointServer:port/sites/site1/Lib1/Subfolder1'
Command sample 2: FileMigrateConsole.exe active '\\remoteServer\d$\folder1\subfolder1' 'http://SharePointServer:port/Lib1'
Command sample 3: FileMigrateConsole.exe inactive '\\remoteServer\d$\folder1\subfolder1' 'http://SharePointServer:port/Lib1/Subfolder1'
Command sample 4: FileMigrateConsole.exe check '\\remoteServer\d$\folder1\subfolder1'
Command sample 5: FileMigrateConsole.exe compare '\\remoteServer\d$\folder1\subfolder1' 'http://SharePointServer:port/sites/site1'
Command sample 6: FileMigrateConsole.exe compare '\\remoteServer\d$\folder1\subfolder1' 'http://SharePointServer:port/sites/site1/Lib1/Subfolder1'

For previous versions:
Command sample 1: FileMigrateConsole.exe all "\\remoteServer\d$\folder1\subfolder1" "http://SharePointServer:port/sites/site1/subsite1" "/" ""
Command sample 2: FileMigrateConsole.exe all "\\remoteServer\d$\folder1\subfolder1" "http://SharePointServer:port" "/" "Lib1"
Command sample 3: FileMigrateConsole.exe active "\\remoteServer\d$\folder1\subfolder1" "http://SharePointServer:port/sites/site1" "subsite1" "Lib1"
Command sample 4: FileMigrateConsole.exe inactive "\\remoteServer\d$\folder1\subfolder1" "http://SharePointServer:port/sites/site1" "subsite1" "Lib1" "sub folder1"
Command sample 5: FileMigrateConsole.exe check "\\remoteServer\d$\folder1\subfolder1"
Command sample 6: FileMigrateConsole.exe compare "\\remoteServer\d$\folder1\subfolder1" "http://SharePointServer:port/sites/site1"
Command sample 7: FileMigrateConsole.exe compare "\\remoteServer\d$\folder1\subfolder1" "http://SharePointServer:port/sites/site1/Lib1"

On SharePoint server (windows 2008 server), run it "as administrator"

Last edited Nov 2, 2011 at 9:59 PM by fangdahai, version 35