if .not.exist(all) then
  @ all-create
endif
!
if file(all%uvfits) then
  define char*256 oldir 
  define char*64 rawdir
  sic dir
  sic mkdir 'all%raw'
  let oldir 'sic%directory'"/"
  !
  sic dir 'all%uvfits'
  let rawdir 'all%raw'
else
  define char oldir*2 rawdir*2
  let oldir " "
  let rawdir " "
endif
define character*64 short
!
sic find *.uvfits
!
! Create the UV tables from the UVFITS files
for item /in dir%file
  @ fits_to_uvt 'item'
  sic parse 'item' short  ! Trim the file name
  sic rename 'short'".uvt" 'oldir''rawdir''short'".uvt" ! Move to final place
next
sic dir 'oldir'
  
