Posted to tcl by venks at Thu Aug 13 07:45:53 GMT 2009view raw

  1. % info patchlevel
  2. 8.6b1.1
  3. % set fo [open "y\nb" w]; puts $fo foo; close $fo
  4. % glob y*
  5. {y
  6. b}
  7. % file rename [glob y*] z0
  8. error renaming "{y
  9. b}": no such file or directory
  10. %

Comments

Posted by venks at Thu Aug 13 07:48:25 GMT 2009 [text] [code]

Solution is to use lindex here: % file rename [lindex [glob y*] 0] z0 % glob z0 z0