Folder(s) in the Sharepoint v2 is an odd entity. Unlike others, it is not derived from the "List" base like Files. In other word, many standard features is not avaliable for it; and renaming is one of them. instead of rename the folder, Microsoft create a new folder, then moved all the contents within to the new folder, and then delete the old folder. This is done by the method of "moveto".
So when try to do the rename, instead of
SPFolder.Name = "NewFolderName";
we will use the code of
SPFolder.Moveto("NewFolderName");
to rename the file, try
SPFile.item["BaseName"] = "NewFileName";
======================
Keywords: SPFolder, SPFile, Rename File, Rename Folder
Trick to Rename Folder Using SPFolder (Sharepoint 2003)
Kevin Zhao (L'Octobre)
at
Wednesday, November 15, 2006
Customized Site Definition and Sharepoint Restore
Kevin Zhao (L'Octobre)
at
Wednesday, November 15, 2006
When restore Sharepoint to a different server, it is important to copy the customized site definition to the new server; otherwise you would get the unexpected errors, such as
"Action can not be completed, please try again"
To move the site definition,
1) visit the folder %SystemDrive%/Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033
2) copy the modified folder to the same directly in new server
3) restart the IIS
Without IISrest, you may get error of "List not found" when visiting the site.
===============
keywords: Sharepoint portal servr 2003, Move to different database server, move to different server, Site definition,
"Action can not be completed, please try again"
To move the site definition,
1) visit the folder %SystemDrive%/Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033
2) copy the modified folder to the same directly in new server
3) restart the IIS
Without IISrest, you may get error of "List not found" when visiting the site.
===============
keywords: Sharepoint portal servr 2003, Move to different database server, move to different server, Site definition,
Subscribe to:
Posts (Atom)