From: "Peña, Botp" Date: 2008-04-29T11:17:52+09:00 Subject: Re: Permission denied - (Errno::EACCES)- Help! From: Clement Ow [mailto:clement.ow@asia.bnpparibas.com] # > On Thu, Apr 24, 2008 at 10:23 PM, Clement Ow # The directory exists actually. When I try to move it manually # myself it # is able to work, so i suppose it's some bug in the fileutils module. # I had no choice but to copy the files to the dest then delete # the files # in the source. =/ # I don't know if anyone can explain what is wrong with the fileutils # module? i cannot reproduce the behaviour on my windows pc. can you post a more vivid session? eg, # first we create a dummy source file FileUtils.touch "\\test\\test1\\test2\\testfile.txt" #=> ["\\test\\test1\\test2\\testfile.txt"] # let's see if it was created # i think yes.. system " dir \\test\\test1\\test2\\testfile.txt" Volume in drive C is hd Volume Serial Number is 7CD8-B514 Directory of C:\test\test1\test2 04/29/2008 09:59 AM 0 testfile.txt 1 File(s) 0 bytes 0 Dir(s) 1,172,480,000 bytes free #=> true # now, let's examine our destination folder # there's should be no files there yet.. system "dir .\\test" Volume in drive C is hd Volume Serial Number is 7CD8-B514 Directory of C:\family\ruby\test 04/29/2008 09:58 AM . 04/29/2008 09:58 AM .. 0 File(s) 0 bytes 2 Dir(s) 1,172,480,000 bytes free #=> true # NOW, LET'S DO THE MV FileUtils.mv "\\test\\test1\\test2\\testfile.txt", ".\\test" #=> 0 # REEXAMINE THE DESTINATION FOLDER IF IT CONTAINS THE FILE # YES IT DOES! system "dir .\\test" Volume in drive C is hd Volume Serial Number is 7CD8-B514 Directory of C:\family\ruby\test 04/29/2008 10:00 AM . 04/29/2008 10:00 AM .. 04/29/2008 09:59 AM 0 testfile.txt 1 File(s) 0 bytes 2 Dir(s) 1,172,480,000 bytes free #=> true # REEXAMINE THE SOURCE FILE IT IT'S STILL THERE # NO, IT IS NOT THERE ANYMORE! system "dir \\test\\test1\\test2\\testfile.txt" Volume in drive C is hd Volume Serial Number is 7CD8-B514 Directory of C:\test\test1\test2 File Not Found #=> false # SUCCESS!, RIGHT? kind regards -botp