.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Last modified by and last modified date changes after doing stsadm export/import

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :SharePoint

After doing an stsadm export/import of a document library, all the document modified dates are changed to current date and modified by changed to the person who did the import. How do I retain the last modified dates and modified by values as in the source library? I know we can preserve metatdata using the Manage content and structure GUI and saving as templates, but anyway to do it via stsadm?


View Complete Post

More Related Resource Links

import-spweb changes some values (create date, modified...)


all my Imported items (export-spweb - >import-spweb) have today's date now.
And the creater is now mydomain\administrator.

Can I fix this somewhere ?
Maybe in a SQL table ?


Latest Records depending on Last Modified Date

Hi there,             I have to get the latest records from the table depending on Last Modified date. Table: ID  Function   Apply        Approved    Withdrawn   LastModifiedDate 1    Coding    1/1/2010   15/1/2010   21/1/2010     21/1/2010 3:58:23 1    Coding    1/1/2010    NULL           NULL           21/1/2010 4:58:23 2    Testing    1/1/2010   15/1/2010   21/1/2010    21/1/2010 3:58:23 3    Analysis  1/1/2010    NULL           NULL           21/1/2010 4:58:23   Output is needed on the basis of last modified date if same fucntion comes more than 1 time. else all other functions need which appears once in table. ID  Function  Apply      Approved    Withdrawn        LastModifiedDate 1    Coding   1/1/2010    

stsadm export / import custom view / personal view views

Hi, i have to export and import a website with a sharepoint list including all personal views. The personal views are used by the endusers in excel data connections binded to the list.  Loss of personal views during import is not mentioned in the technet discription of export / import command ( http://technet.microsoft.com/en-us/library/cc766807(office.12).aspx  ) I am actually testing the export / import between two site collections, but always losing the personal views (MOSS 2007 with CU April 2010). This discussion had the same topic http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/4e299838-72c2-4f56-8dc3-05ba2a2999d9  but with no definite answer. Please tell me if this is by design or what could cause this behavior. Thanks in advance. Boris Boris Schlotthauer

How to get share point Subsite Last Accessed date using Object Model in moss(Not Modified date)


Hi Guys,

My task is to check last accessed date to a sub site in share point like "http://asc-hv1-mossvm:4233/murali121". its not depended on particular log in user (so i.e any user is valied except system account).

if anybody have any idea please share with this post.

Thanks in Advance.



The file 'document name' has been modified by user name on 'date'



After modifing the document, if the user edit the document properties and save, it shows error like,

The file 'filename' has been modified by 'user name' on 28 Sep 2010 17:21:04 +0530 .

what is this means? how to resolve this, Please guide me. thanks in advance.


Last Modified date of the database



How to find the Last modified date of the whole database (Not the specific table)? Is there any function available? I checked the last modified date of the mdf file and that does not give the correct information :(

Dreaming a world without any war in anywhere

Modified date of a View - SQL 2000

In SQL Server 2000, is it possible to get the date that a View was last

Only date is displayed in modified column. How do I get it to show time also?


I can't find out how to set the format for this column in document libraries. I have seen the column also display time so I know it's possible.



SharePoint Import/Export or other STSADM commands?


Greetings -

We are currently in the process of moving our MOSS 2007 environment over to a new server.  We currently have a single server farm (SQL, Search, Front End all on one box) and are splitting the SQL off to a SQL Server.  We have gone through the DB copy / restore for the new box.  When looking at the sites it appears that ONLY the servername/sites were moved over to the new SQL box.  We still have servername/pages and servername/sitedirectory, etc... that did not appear to move.  So if I go to servername/sites/executivesite it pops up fine but if I go to servername/sitedirectory/exectuivesite2 nothing. 

I started to do a export / import of the entire /SiteDirectory and ran into a size error when attempting to run stsadm -o -export "siteblahblah" -filename placetoputtheexportfile -includefilesecurity so I backed up the same sitedirectory using the -nofilecompression.  The export ran fine with no errors or warnings.  When I attmempted to do the import it went through but with the warning that (simplified) this data does not include the file security settings so it won't be imported".  It imported almost all the data except a few lists and document libraries and excluded almost all file security.  Is there a better way to do this or am I just going to have to keep banging my head till i

how to add the modified date to an entry



 I have added a datetime field to my db and added  the default  value  binding to (getutcdate()), (allow null=false)  how can I have  the date/time  added to my db when the user is adding his data ?


How to display the "Date Modified" property of documents in SharePoint document library



I'm using MOSS 2007.

Perhaps you already know that the "Modified" column in SharePoint document library is different from the "Date Modified" property of the document.

"Modified" being the SQL property of the object.

As a consequence, when uploading document to document library you don't have the actual modified date of the document. While you can see it opening the document in Explorer View!!

Is there a way to display the actual modified date of documents as a column in SharePoint document library?


Thank you.




SharePoint Designer Workflow - how to compare the Items if it is modified date is older than 20 days


I have a workflow which will keep track of specific meta data selection for a Custom List, as soon as an item gets updated to a specific selection say it as Resolved, I am sending an email to an user.


But after this I will need to check for every item in the list that If an item gets resolved and older than 20 days, I will have to move this item to a different list. I can get the resolved item date, store it an variable, but from here I will need to check if the item is older than 20 days and if it is this needs to be moved.

My point is the work-flows will be fired only when an item gets changed or updated, how to keep track of every item in the list and automatically move the older items without any manual intervention.


Am I clear in my requirement, if not kindly let me know.

If you have knowledge, let others light their candles in it.

"Date Modified" not working in Explorer View if document is created in Explorer View


Windows 7 SP1 with Webclient (webdav), Office 2010 Professional Plus, connects to a Sharepoint 2010 Document Library, using Explorer View, mapped to a disc drive letter. Document library has check out requirement turned off.

Customers work only in Windows Explorer with Webclient, they dont want to use web interface to Sharepoint.

Information to recreate the problem:

CASE1) Let's say a new docx document is created in Explorer View (in Explorer by  right-click-new Word document). Customer waits couple of minutes, enters and changes the document in Explorer View, and then saves it and closes Word. Result: Column "Date Modified" in Explorer view is unchanged, when it should have been changed. (!)

CASE2) Let's say I created new docx document in Web View (all documents view). Customer waits couple of minutes, enters the same document IN EXPLORER VIEW, changes it and then saves it and closes Word. Result: Column "Date Modified" in Explorer view is CHANGED to the new save time so now it works!

Why is this happening and is there any fix for this. Is this problem of WebDAV or of Sharepoint? It happends with .docx and .xlsx files, and not with .txt files and some othes which work correct when created in Explorer View.

Also when I copy/paste to Explorer View , column Date

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)


Hey guys

I came across this bug using while trying to implement a sitemap

Line 147:						Panel panel = new Panel();
Line 148:						panel.Controls.Add(_viewState);
Line 149:						Page.Form.Controls.Add(panel);
Line 150:						string script = "document.getElementById('" + _viewState.ClientID + "').value = GetViewState__AspNetTreeView('" + Extender.MakeChildId("UL") + "');";
Line 151:						Page.ClientScript.RegisterOnSubmitStatement(typeof(TreeViewAdapter), _viewState.ClientID, script);

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.Add(Control child) +8696951
   CSSFriendly.TreeViewAdapter.SaveAdapterViewState() in E:\wwwroot\ThirdParty\CSSFriendly\CSSFriendly_24242\CSSFriendly\TreeViewAdapter.cs:149
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +8901848
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
   System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148

Info Path form when modified by using UTF-8 encoding having issues with existing 'iso-8859-1' char



I am modifying the infio path form 2007 from my state machine workflow to constantly update the status fields in the request form.

below is the method i created for the same..

private void updateInfoPathRequestForm(string xpathNode, string nodeValue)
            SPUserToken token = workflowProperties.Web.CurrentUser.UserToken;
            using (SPSite _site = new SPSite(workflowProperties.Site.ID, token))
                _site.AllowUnsafeUpdates = true;
                using (SPWeb _web = _site.OpenWeb(workflowProperties.Web.ID))
                    SPListItem item = _web.Lists[workflowProperties.List.ID].Items[workflowProperties.Item.UniqueId];

This page has been modified

I have a spin on a well documented problem.  I have several sub sites that have this issue.  Quite often when a new list item is being created, the person clicks new, types in some text and then clicks OK, they get an error that says "This Page has been modified since you opened it. You must open the page again."  If you click back and click OK again you get the same error.  You have to cancel and click new again to get around it.  This doesn't always happen, I'd say about 20% of the time.

This is not on a new page, not adding a webpart, not editing a content editor.  This is a brand new task in a task list.
This will also happen when an item is being edited.  A task is edited, click OK, get the error saying it has changed.  No other person is using the list. Again this doesn't always happen.

Any ideas?

stsadm Import command + include user security



When I move sites from test to staging to production, I am using the stsadm –o export command with the –includeusersecurity option in the staging environment.  In production environment, I then use the stsadm –o import command with the –includeusersecurity option.  I was assuming that this option was bringing over the security on the exported site only.  This does not seem to be the case.

Last night I exported one sub site to produtction.  Today, I was notified that the security groups on other sub sites have been altered.  


So why is it when using the –includeusersecurity option effect all sub sites and not just the one sub site being moved from staging to production

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend