home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
convertids.tcl
< prev
next >
Wrap
Text File
|
1996-06-05
|
2KB
|
50 lines
#---------------------------------------------------------------------------
#
# 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
}
}
}