User Guide > Tasks > Using Refactoring > Moving Files

Moving Files

This procedure describes how to move a file, which will result in the automatic updating of all instances where that file is referenced (required, included etc.) within the project to reflect its change of location.

Note:

Ensure that you save any changes to the file before applying the refactoring feature.

Instructions on how to complete a procedure

To move a file:

  1. In PHP Explorer view, right-click the file which you would like to rename and select Refactor | Move -or- press Alt-Shift-V.
    A Move File dialog will appear.

Move location

  1. Select the new location of the file.

  2. Check the "Update references" box and click Preview.
    A preview window with a changes tree will open showing all the changes which will be made to reflect the move of the file.

Move changes tree

  1. You can scroll through the different changes using the scrolling arrows .
    Note that, if the file has been referenced (required, included etc.) in other files, the reference to the location of that file in other files will also have been changed.

  2. Unmark the checkbox of changes which you do not want applied.

  3. If you are satisfied with the changes, press OK.

The file will be moved and the file's new location will be updated in all instances where that file is referenced.

 

 

Related Links:

Refactoring

Using Refactoring

Renaming Files

Renaming Elements

Organizing Includes

Refactor Menu

 

 

©1999-2013 Zend Technologies LTD. All rights reserved.