Task

Rename:

   a file called     input.txt     into     output.txt     and 
   a directory called     docs     into     mydocs.


This should be done twice:  
once "here", i.e. in the current working directory and once in the filesystem root.

It can be assumed that the user has the rights to do so.

(In unix-type systems, only the user root would have
sufficient permissions in the filesystem root.)




 
#lang racket
 
(rename-file-or-directory "input.txt" "output.txt")
(rename-file-or-directory "docs" "mydocs")
 
;; find the filesystem roots, and pick the first one
(define root (first (filesystem-root-list)))
 
(rename-file-or-directory (build-path root "input.txt")
                          (build-path root "output.txt"))
(rename-file-or-directory (build-path root "docs")
                          (build-path root "mydocs"))
 