g.rename.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <h2>DESCRIPTION</h2>
  2. <em>g.rename</em> allows the user to rename data base
  3. element files in the user's current mapset. The user can
  4. specify all necessary information to <em>g.rename</em> on
  5. the command line, by specifying: the type of data base
  6. element to be renamed (one or more of: <b>raster</b>,
  7. <b>raster_3d</b>, <b>vector</b>, <b>icon</b>, <b>labels</b>,
  8. <!-- old_vector, ascii_vector -->
  9. <b>region</b>, and <b>group</b>); the specific file element
  10. in the current mapset to be renamed (<em>old</em>); and the
  11. new name to be assigned to this file element (<em>new</em>)
  12. in the current mapset. The file element <em>old</em> is
  13. then renamed to <em>new</em>.
  14. <p>
  15. Users can also simply type <em>g.rename --help</em> without
  16. arguments on the command line, to receive a menu of
  17. existing data base element types and files from which to
  18. choose for possible renaming:
  19. <div class="code"><pre>
  20. raster raster map(s) to be renamed
  21. raster_3d 3D raster map(s) to be renamed
  22. vector vector map(s) to be renamed
  23. labels paint label file(s) to be renamed
  24. region region definition(s) to be renamed
  25. group imagery group(s) to be renamed
  26. </pre></div>
  27. <h2>NOTES</h2>
  28. If a data base element has support files (e.g., as is
  29. commonly the case with raster maps), these support files
  30. also are renamed.
  31. <p>
  32. If the user attempts to rename a file to itself by setting
  33. the <em>new</em> file name equal to the <em>old</em> file
  34. name (e.g., <b>g.rename raster=soils,soils</b>),
  35. <em>g.rename</em> will not execute the rename, but instead
  36. state that no rename is needed. However, <em>g.rename</em>
  37. will allow the user to overwrite other existing files in
  38. the current mapset by making the <em>new</em> file name
  39. that of an already existing file.
  40. <p>For portability reasons, <em>g.rename</em> is ignoring case of
  41. names. To change the case of a map name, first rename the map
  42. to a name which differs by more than case, then rename it to
  43. the intended name.
  44. <h2>EXAMPLE</h2>
  45. <div class="code"><pre>
  46. # rename raster map
  47. g.rename raster=oldrast,newrast
  48. # rename vector map
  49. g.rename vector=oldvect,newvect
  50. # combined renaming
  51. g.rename raster=oldrast,newrast vector=oldvect,newvect
  52. </pre></div>
  53. <h2>SEE ALSO</h2>
  54. <em>
  55. <a href="g.copy.html">g.copy</a>,
  56. <a href="g.list.html">g.list</a>,
  57. <a href="g.remove.html">g.remove</a>
  58. </em>
  59. <h2>AUTHOR</h2>
  60. Michael Shapiro,
  61. U.S.Army Construction Engineering
  62. Research Laboratory
  63. <p><i>Last changed: $Date$</i><p>