Automatic file upload to SharePoint Sites in Windows Server 2003 X64

 

Automatic file transfer between SharePoint document libraries (solution version date 6 Dec 2007)

 

Comment: previous posts mentioned inability of automatic file transfer between document libraries. This is a workaround, in which we use a Windows folder as temporary location in the automatic procedure.

 

Applies to: Most windows versions, including Windows server 2003 X64.

 

Reason for this solution:

  • Mapping network drive for SharePoint sites works unstable (see posts on disappearing files), and in my case I cannot even create one, apparently because my SharePoint site has a specific port number.
  • Webdrive 7.XX does not support Windows Server 2003 x64: windows service option does not start up, and drives are not visible by other applications that work as windows service.
  • Automatic transfer of files directly between document libraries gives errors.

 

Requirements:

  • Webdrive 7.XX (or comparable web folder drive mapping application, but try WebDrive first)
  • RoboTask (or comparable automation application, but try Robotask first)
  • FireDaemon (or comparable ‘run as a service’ application, but try FireDaemon first)

 

Procedure:

  1. Install Webdrive, RoboTask and FireDaemon. Do NOT make use of the ‘run as a service’ options in WebDrive and RoboTask, because that options use the local machine service account to access drives, which makes certain features inaccessible, or make WebDrive mapped drives inaccessible for needed applications.
  2. Install Webdrive as service in FireDaemon: Choose a distinctive service name like WebdriveFD. Then, browse for the executable [C:\Program Files (x86)\WebDrive\webdrive.exe], Tick ‘Console Application’, use as logon account an account that has full access to the SharePoint site, tick ‘Interact with desktop’, startup mode Automatic, leave the rest as default.
  3. Install RoboTask as a service in FireDaemon, use the procedure as mentioned above, i.e. use RobotaskFD as name etc.)
  4. FireDaemon will cause WebDrive en RoboTask windows to automatically open (and reappear if you close them). This is o.k. for now, for as long as you are working with their settings. Do not start Webdrive or Robotask through the normal way, because then your current windows account will run them, which we don’t want.
  5. In WebDrive, set the SharePoint connections as drive letters the way you like it. I.e. but the top level site of your SharePoint site as one web drive. Use always the same windows account that has full access to SharePoint document libraries.
  6. Although FireDaemon uses the same windows account for WebDrive, the drive letters are not accessible for the current account that is logged in on the Windows console: i.e. in your Windows Explorer you might not see WebDrive drive letters, and if you use the same letters or they are inaccessible; just leave them as they are.
  7. A way to check if the ‘background’ drive letters are successfully created and accessible, is to use Robotask (which uses the same login account in FireDaemon): In Robotask, make a ‘Move’ task that moves files from a pickup folder (a windows folder) to a document library in your newly created drive letter. (Later you can set the Move task to check the windows pickup folder if files change; if they do, a procedure starts to move the contents to a document library. You can add multiple tasks with wildcard filters, i.e. files that start with “XX-“ are moved to the document library that has a topic with code XX-  etc.)

 

Creating a new, or changing settings of the background WebDrive connection:

1.      While the FireDaemon services are running, open WebDrive main window by right-clicking on the WebDrive icon in the tray.

2.      Add a new connection or change settings the way you want, including correct credentials to login into the MOSS site.

3.      Important: tick 'Connect at login/startup'

4.      Click 'Connect'

5.      There will be a popup error message “Drive XX does not exist”. Ignore that error message because the drive has successfully been made in the background. (it is your current logged on windows account that tries to access the drive)

6.      Open de FireDaemon Service Manager,

7.      First Restart the FireDaemon  WebDrive service

8.      Then Restart the FireDaemon  RoboTask service

9.      The Robotask is now able to use the new WebDrive drive letter for its tasks, which you can check by creating a copy task and browsing inside RoboTask application for the newly created drive letter.  Your current logged on windows account you will see network drives as 'Disconnected Network drives' which cannot be accessed or disconnected. I have not been able to remove these icons from the Windows explorer without losing the background drive connections, so leave them as they are.

Disconnecting a background WebDrive connection:

1.      While all FireDaemon services are running, open WebDrive (through Start menu or by right-clicking on the icon in the tray)

2.      Untick 'Connect at login/startup/'

3.      Click Exit.

4.      Restart the FireDaemon WebDrive service

5.      After that, restart the FireDaemon RoboTask service

Note: when disconnected, the WebDrive drive letter will be visible in the Robotask browse menu, but won't be accessible.

Deleting a background WebDrive connection:

1.      First disconnect the network drive as mentioned above (up to restarting the services which is not necessary yet)

2.      Then open Webdrive again and delete the network drive connection.

3.      Restart the FireDaemon WebDrive service, and after that restart the FireDaemon RoboTask service.

Note: change settings when using the console account, not through a remote desktop account because then you won’t see the icons in the tray.

When installing the Webdrive and Robotask services in FireDaemon, both services should be set running on a Windows user account that can access MOSS sites and that is primarily used for background services like this.  Use another account to log into Windows console yourself or things start to conflict if you edit the WebDrive settings.

Comment:  You never need to reboot in order to create or delete a drive.  Especially for deleting network connections, just follow the instructions mentioned above.

 

Solution for automatic document transport between document libraries:

Robotask (and other file transfer programs I checked) cannot automatically move files between document libraries, either a copy/move error appear or changes to files on the server side are not noticed.

 A workaround is to create two different tasks: one that moves files from a document library to a windows folder, and another task that moves files from the windows folder to a document library. This works like a charm, although you need to take care of the cache settings in WebDrive:

1.      Open Webdrive main window - File - Program settings - Cache settings - Options

2.      Tick "Multi user, validate cached files with server"

3.      Set 'Cache recent file information in memory for' 15 seconds.

If you don’t apply these cache settings, WebDrive won’t notice that files are changed at the server, therefore the task of Robotask to watch folders for changes, won’t work.

 

Last comments:

·         After you tested everything and all works, untick the 'Interact with desktop' option under Settings in FireDaemon for both WebDrive and RoboTask, so that those windows will disappear.
If you want to change any setting in either application, you need to tick "Interact with desktop again', after which the windows and settings become visible again. Remember that opening and using Webdrive and Robotask in the ordinary way won't affect the settings of those applications in FireDaemon, so only do it the way mentioned above.

 

·        If you are feeling creative, you can try to make batch files of all procedures mentioned above. Some will be needed to ‘run as’ the background user account.

From: Orfeo <Orfeo1@gmail.com>Newsgroups: microsoft.public.sharepoint.portalserverSubject: Re: Solution: How to automatically move files in MOSS 2007 using Webdrive and Robotask (applies to Windows Server 2003 X64)
Date: Thu, 6 Dec 2007 09:28:48 -0800 (PST)

Published Sun, Dec 2 2007 11:52 by OBTS
Filed under: ,