home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # Copyright (c) 1996 by Cadre Technologies Inc.
- #
- # This software is furnished under a license and may be used only in
- # accordance with the terms of such license and with the inclusion of
- # the above copyright notice. This software or any other copies thereof
- # may not be provided or otherwise made available to any other person.
- # No title to and ownership of the software is hereby transferred.
- #
- # The information in this software is subject to change without notice
- # and should not be construed as a commitment by Cadre Technologies Inc.
- #
- #---------------------------------------------------------------------------
- #
- # File : @(#)convertids.tcl 2.1
- # Original date : April 1996
- # Description : Convert NT 4.0/00 file id's to generic 4.0/01 format.
- # Must be in project directory when called
- #
- #---------------------------------------------------------------------------
- #
-
- proc convertIds {} {
- set allFiles [glob -nocomplain *]
-
- foreach fileName $allFiles {
- if {[file isdirectory $fileName]} {
- cd $fileName
- convertIds
- cd ..
- }
-
- set fileParts [split $fileName .]
- set namePart [lindex $fileParts 0]
-
- if {[string length $namePart] == 20} {
- set extPart ""
-
- if {[llength $fileParts] == 2} {
- set extPart .[lindex $fileParts 1]
- }
-
- set newName "[IdConvertor::convert $namePart]$extPart"
-
- BasicFS::renameFile $fileName $newName
- }
- }
- }
-