Rename folder causes file part folder content missing

LabKey Support Forum
Rename folder causes file part folder content missing Maya Li  2011-09-30 10:16
Status: Closed
 
I have created a file structure using folder containers. For each folder, I put in a file web part. When I renamed the root folder, all of the file web parts appear empty with previously uploaded files missing. The problem went away when the root folder name was reverted back. Is there a way to rename folders without this side effect? Note, the checkbox for "Add a folder alias for the folder's current name. This will make links that still target the old folder name continue to work." was checked when I renamed the folder.

Thanks!
Maya
 
 
Karl Lum responded:  2011-10-02 19:21
Hi Maya,

I've opened an issue to track this, we should move the files associated with a folder on rename this is done when the site wide file root is changed but apparently not for individual folders.

As a workaround, something you could try is to manually copy the old files to the new folder location. Each folder on the LabKey server has a corresponding @files subdirectory on the file system that stores files referenced by a file web part. If you can find the original @files subdirectory and copy it to the new location, you should be able to restore your files in the webparts.

You can get the location in the file system that corresponds to a project by navigating to : manage project->project settings and then viewing the files tab. The path of the file root in the text box should indicate where on the file system the files are stored. A subfolder to a project will just have a corresponding subdirectory in the file system with its own @files subdirectory.
 
Maya Li responded:  2011-10-03 11:05
Karl:

Thanks for the suggested workaround and opening an issue for it. I can see creating a new folder/project and copy the older @file directory over. It is however undesirable because we have a project with much work devoted to user permissions defined, which we wish to avoid having to do over in a new project. Further more, that's an operation much too complicated for our content user. We could live with not changing the project name for now but it would be wonderful to have the issue be fixed to avoid "unexpected" surprised from the less technical users.

Your help is much appreciated.
Maya