|
Pages: [1]
|
 |
|
Author
|
Topic: Copy files and text-list (Read 430 times)
|
|
Silvia
|
Hi everybody , I'm trying to create a little program that creates backups. Anyway, I have 2 troubles with this: 1. I created a "Browse" button where the user chooses what he wants to copy, once did this I want to display the chosen files in a text-list but I cannot understand how to do this, 2. When creating the backup I need to copy the selected files in a new directory automatically created named with the curent date/time (if possible :huh: ), but I don't know how to copy files (any type of file) and create this directory. Thank you very much, Silvia
P.S.: Ah, I forgot to tell you, I'm working on Windows XP with REBOL/View 1.3.1.3.1
|
|
|
|
|
Logged
|
|
|
|
|
Sunanda
|
The easiest way to copy a file (or perhaps the only way, unless you go platform-specific with Call) is to read it and then write it. You may also need to create the destination folder. if not exists? new-path [ make-dir/deep new-path ]
file-contents: read/binary join old-path file-name write/binary join new-path file-name file-contents
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |