Version 3 of Directory, General Questions

Updated 2009-10-23 02:56:34 by WHD

Creating a directory

Steven, October 22nd 2009

Here is a simple question yet quite puzzling for a beginner like myself. I am on directory and file c:/London/Abbey Road.txt and I'd like to click on an icon to do the following tasks

* 1) I click on the icon and a directory called back-up will be created automatically here: c:/London/Back-up If the Back-up directory already exists the program will pass

* 2) The current file, the one I am currently reading saves itself at: c:/London/Back-up/Abbey Road.txt

I've had a few problems with my program lately and without that back-up system I'll lose a lot of files and I'll be completely lost. Thanks for greatly needed help! (Steven)


WHD:

  proc doit {file} {
      file mkdir Back-up
      file copy $file [file join Back-up $file]
  }

  button .btn -text "Make Back-up Dir" -command [list doit MyFile.txt]