Firefly KB

Q10002 - How to move a file/folder?

Moving files become a must-have feature of modern SCM tools.  For example, if you are writing Java code, when you change a package name, you need move existing Java source code files. Or sometimes you want to reorganize the directories.  Moving files should not cause any loss of history information, or damage existing labels that contain those files.

In Firefly, you can move a file to another folder. You can move a folder as well, and Firefly will move files under that folder recursively. Firefly file moving will increase a version of the file, and does not cause any loss of file history. Existing branch labels that contain the previous versions of this file won't be affected either.

Also it is very easy to perform this operation.  For instance, you have a local workspace of project vim under c:\ws\vim, and you want to move c:\ws\vim\src\config.h to c:\ws\vim\include. Here is how:

Firefly Client GUI

Select the file you want to move, click menu 'Firefly->Move', the 'Move' dialog opens, type the new folder name, select a changeset, click 'OK'. You need to submit the changeset to apply this change to parent branch.

Command line

c:\>cd ws\vim\src
c:\ws\vim\src>hff move config.h ..\include

After a file is moved and submitted to server, other developers can simply apply this change to their local workspaces by executing Firefly bringover.

Firefly has a feature to detect and resolve location conflicts caused by file moving. Say if developer Tom moved src/config.h to include, and submitted, and developer John moved src/config.h to src/include in his local workspace, when developer John tries to do a submit, Firefly server will notify him that there is a conflict, and prompt him to select a path.

Please note, don't move a workspace file outside Firefly. If you move a workspace file in Windows Explorer or dos command shell, Firefly will not be aware of this operation. As a result, you will have a private file in the target folder and a missing file in the original folder.

Applies To

  • Hansky Firefly 3.0