#!/quovadx/qdx5.4/integrator/bin/hcitcl
#move all .old files to smatfiles directory and delete from process directory
#get current date
set dt [clock format [clock seconds] -f “%m_%d_%Y” ]
#set directory where whats are
set sourcedir “/quovadx/qdx5.4/integrator/smat_data”
#searches for any file in source directory with .old
set sourcefiles [glob -path $sourcedir “/*.old*”]
#Moves files from source directory to archivesmat directory
foreach sourcedir $sourcefiles {
set path [split $sourcedir “/”]
set filename [lindex $path 5]
set destdir “/quovadx/qdx5.4/integrator/archivesmat/$dt/”
file mkdir $destdir
file copy $sourcedir $destdir
file delete -force $sourcedir
}
exit