locked
change Document names RRS feed

  • Question

  • folks

     

    i have a big document library , with many documents, i want to change the name of selected documents which starts from SC and change the letter SC to NN, so every document in that library contain SC will be chnaged to NN

    SCdocument = NNdocument

    How can i do that

    Best regards


    SharePoint 2007 (Administration/Development) | Web developer and .NET DTS Programmer | .NET Framework 2.0/3.5 | SQL Server 2008/2005/2k
    Friday, August 19, 2011 7:20 AM

Answers

  • On how to make the batch file or rename the bulk files you can check this 

     

    http://www.labnol.org/software/tutorials/rename-multiple-files-bulk-excel-googl-docs/2481/


    Thanks & Regards Posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by aliusman Monday, October 10, 2016 3:35 AM
    Friday, August 19, 2011 9:06 AM
  • It is true that, after modifying any table column value  directly from Content DB, Microsoft will not provide any support for your installation and you may face unexpected behavior in terms of presentation of data from UI. Still if you want to have a look at the document library, you may look into dbo.AllDocs table with the corresponding content db.

    But the best possible approach in this case is to write a Batch file/console application which willl perform below steps.

    1.    Create a SPWeb object of the web inside which the document library is present.

    2.    Find the document library by its name or GUID and get its instance.

    3.    Modify the column value from SCdocument to  NNdocument.

    Hope this is Helpful.

    Thanks,

    Bivs

     

    • Marked as answer by aliusman Monday, October 10, 2016 3:35 AM
    Monday, August 22, 2011 9:21 AM

All replies

  • Off the top of my head, I imagine that mapping the drive and either using a batch fiile or a console application with the right regular expressions would do it.
    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/
    Friday, August 19, 2011 8:59 AM
    Answerer
  • On how to make the batch file or rename the bulk files you can check this 

     

    http://www.labnol.org/software/tutorials/rename-multiple-files-bulk-excel-googl-docs/2481/


    Thanks & Regards Posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by aliusman Monday, October 10, 2016 3:35 AM
    Friday, August 19, 2011 9:06 AM
  • Hi,

    create a console application to do this and run on the server. or in case you can create a custom feature to achieve this.

    for filtering criteria on all the documents you can take help of CAML query.

    here is a reference for you

    http://blogs.msdn.com/b/sowmyancs/archive/2008/10/02/programmatically-rename-a-file-inside-a-sharepoint-document-library.aspx

    hope this helps you


    Warm Regards, Bhushan http://www.passionatetechie.blogspot.com
    Saturday, August 20, 2011 8:15 PM
  • Isn't there any thing i can do in SharePoint or SharePoint Database to archive that?
    SharePoint 2007 (Administration/Development) | Web developer and .NET DTS Programmer | .NET Framework 2.0/3.5 | SQL Server 2008/2005/2k
    Monday, August 22, 2011 12:28 AM
  • Hi,

    what do you mean by in SharePoint database?

    ultimately the documents which you see in your document library are in the content database of your site and the solution which I have proposed , describes the way to interact with the SharePoint , and those name changes will be saved in the database only.

    hope this helps you


    Warm Regards, Bhushan http://www.passionatetechie.blogspot.com
    Monday, August 22, 2011 5:18 AM
  • Thats what i want but i am not sure how to do that, How to reach that document library Table in SharePoint database
    SharePoint 2007 (Administration/Development) | Web developer and .NET DTS Programmer | .NET Framework 2.0/3.5 | SQL Server 2008/2005/2k
    Monday, August 22, 2011 6:46 AM
  • Forget the database, IF you change anything in it, you'll forfeit any Microsoft support for your installation.  Even reading from the database is sometimes ropey in thier eyes.  The suggestions you've had in the thread work.  I would consider the batch file too.
    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/
    • Proposed as answer by Bivsworld Monday, August 22, 2011 9:03 AM
    • Unproposed as answer by Bivsworld Monday, August 22, 2011 9:03 AM
    Monday, August 22, 2011 8:56 AM
    Answerer
  • It is true that, after modifying any table column value  directly from Content DB, Microsoft will not provide any support for your installation and you may face unexpected behavior in terms of presentation of data from UI. Still if you want to have a look at the document library, you may look into dbo.AllDocs table with the corresponding content db.

    But the best possible approach in this case is to write a Batch file/console application which willl perform below steps.

    1.    Create a SPWeb object of the web inside which the document library is present.

    2.    Find the document library by its name or GUID and get its instance.

    3.    Modify the column value from SCdocument to  NNdocument.

    Hope this is Helpful.

    Thanks,

    Bivs

     

    • Marked as answer by aliusman Monday, October 10, 2016 3:35 AM
    Monday, August 22, 2011 9:21 AM
  • Alrighty , thanks Guys,

     

    Can you guys help me writing a batch file as per above senario .

     

    Cheers


    SharePoint 2007 (Administration/Development) | Web developer and .NET DTS Programmer | .NET Framework 2.0/3.5 | SQL Server 2008/2005/2k
    Tuesday, August 23, 2011 1:08 AM
  • One more thing guys, I cant run batch file as all the documents are saved in SQL database (thats what SharePoint does, i think). there is no physical path available for these documents
    SharePoint 2007 (Administration/Development) | Web developer and .NET DTS Programmer | .NET Framework 2.0/3.5 | SQL Server 2008/2005/2k
    Tuesday, August 23, 2011 2:18 AM
  • One more thing guys, I cant run batch file as all the documents are saved in SQL database (thats what SharePoint does, i think). there is no physical path available for these documents
    SharePoint 2007 (Administration/Development) | Web developer and .NET DTS Programmer | .NET Framework 2.0/3.5 | SQL Server 2008/2005/2k


    You don't need too.  Map the drive and run a batch file on that drive.  You MAY need to unblock the.bat file extension to do this but you won't need to access the database.

    I'll see if I can write one later when I get in.


    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/
    Tuesday, August 23, 2011 10:38 AM
    Answerer
  • You don't need too.  Map the drive and run a batch file on that drive.  You MAY need to unblock the.bat file extension to do this but you won't need to access the database.

    Please help me mapping a drive, Which physical path should go for Shared Document library

    cheers


    SharePoint 2007 (Administration/Development) | Web developer and .NET DTS Programmer | .NET Framework 2.0/3.5 | SQL Server 2008/2005/2k
    Tuesday, August 23, 2011 11:45 PM