I wrote the following `recursive_copy¡¯ for you. And tested, it works. 
recursive_copy (a_source_dir, a_target_dir: DIRECTORY) is
-- Copy all items (include sub directories) from `a_source_dir' to
`a_target_dir'.
require
exists: a_source_dir /= Void and then a_source_dir.exists
exists: a_target_dir /= Void and then a_target_dir.exists
local
l_sub_items: ARRAYED_LIST [STRING]
l_file_name: FILE_NAME
l_src_dir_name, l_target_dir_name: DIRECTORY_NAME
l_sub_src_dir, l_sub_target_dir: DIRECTORY
l_src_file, l_target_file: RAW_FILE
l_dot, l_dot_dot: FILE_NAME
do
from
create l_dot.make_from_string (".")
create l_dot_dot.make_from_string ("..")
l_sub_items := a_source_dir.linear_representation
l_sub_items.start
until
l_sub_items.after
loop
-- Prepare
create l_src_dir_name.make_from_string (a_source_dir.name)
l_src_dir_name.extend (l_sub_items.item)
create l_sub_src_dir.make (l_src_dir_name)
create l_file_name.make_from_string (a_source_dir.name)
l_file_name.set_file_name (l_sub_items.item)
create l_src_file.make (l_file_name)
create l_file_name.make_from_string (l_sub_items.item)
-- Switch
if l_file_name.is_equal (l_dot) or l_file_name.is_equal (l_dot_dot) then
-- We ignore `.' and `..'.
elseif l_sub_src_dir.exists then
create l_target_dir_name.make_from_string (a_target_dir.name)
l_target_dir_name.extend (l_sub_items.item)
create l_sub_target_dir.make (l_target_dir_name)
if not l_sub_target_dir.exists then
l_sub_target_dir.create_dir
end
recursive_copy (l_sub_src_dir, l_sub_target_dir)
elseif l_src_file.exists then
l_src_file.open_read
create l_file_name.make_from_string (a_target_dir.name)
l_file_name.set_file_name (l_sub_items.item)
create l_target_file.make (l_file_name)
if not l_target_file.exists then
l_target_file.create_read_write
end
l_src_file.copy_to (l_target_file)
l_src_file.close
l_target_file.close
end
l_sub_items.forth
end
end
To test the feature, just have something like:
test is
-- Test `recursive_copy'
local
l_dir_src, l_dir_target: DIRECTORY
do
create l_dir_src.make_open_read ("E:a")
create l_dir_target.make ("E:b")
recursive_copy (l_dir_src, l_dir_target)
end
--- In eiffel_software%40yahoogroups.com">eiffel_software
yahoogroups.com, Hubert Cater <hcater
...> wrote:
>
> Hello,
>
> I was wondering if there was an Eiffel class that handled copying the
> contents from Directory A to Directory B.
>
> I can do this using Windows system commands but I was wondering if
there
> was an alternative solution.
>
> Thanks,
> Hubert
>
> --
> Fury Software
>