From: 7stud -- Date: 2008-03-04T10:18:43+09:00 Subject: Re: ruby tk -- how do you get it working? 7stud -- wrote: > Tim Ferrell wrote: >> One small point I meant to bring up earlier - when I've written scripts >> like this in the past, I always have the script *move* the files to a >> temporary location rather than deleting them directly. That way I can >> inspect everything and delete them by hand if everything checks out >> ok... >> >> Maybe that's overly paranoid but having a script delete something >> important by mistake really sucks... :-) >> > > Delete 1500 files by hand? Ah. I think I get what you mean now. Instead of deleting the files, you would have the program collect all the files in a new directory. Then after running the program if the original ruby install works correctly, you know you can safely run another program to delete all the files in the new directory. One problem I see with that is: if your original ruby install failed to work correctly, you won't have any idea how to put everything back together again. In order to know how to put all the files back in their previous locations, you would have to do something like create a file in the new directory which lists the original path of the each file and the new path. Then you could create a program that reads that file and moves all the files back to their previous directories. Or is there an easier way? -- Posted via http://www.ruby-forum.com/.