Rename file on windows share

Hi,

I’m trying to rename a file to another folder located on a windows share
folder.

I’ve got this message :

`rename’: Permission denied @ rb_file_s_rename -
(T:/FLUX_PES/PESALR1EM01RE0120170103081859.xml,
T:/FLUX_PES/history/PESALR1EM01RE0120170103081859.xml) (Errno::EACCES)

Have you an idea ?

Thanks

Emmanuel BOUGEROLLE wrote in post #1185417:

Hi,

I’m trying to rename a file to another folder located on a windows share
folder.

I’ve got this message :

`rename’: Permission denied @ rb_file_s_rename -
(T:/FLUX_PES/PESALR1EM01RE0120170103081859.xml,
T:/FLUX_PES/history/PESALR1EM01RE0120170103081859.xml) (Errno::EACCES)

Have you an idea ?

Thanks
File.rename work on sharef file system :
==
cd _Affaires_à_ARCHIVER

T:\X>ls
traceArchivage.txt

T:\X>irb
irbrc: d:/usr/Ruby/local/irbrc.rb
History: d:\usr\Ruby\local/irb-history.txt => 31 KB

File.rename(“traceArchivage.txt”,“traceArchivage2.txt”)
=> 0

exit

T:_Affaires_à_ARCHIVER>dir
Le volume dans le lecteur T s’appelle DATA
Le numéro de série du volume est 3A57-0713

Répertoire de T:_Affaires_à_ARCHIVER

03/01/2017 20:43 .
03/01/2017 20:43 …
19/07/2011 08:30 64 traceArchivage2.txt

maybe your file is locked by another tool : word/excel, xml editor …

Hi,

You’re right…

My XML file was open with Nokogiri and not in a block.

It’s ok with closing file…

I had no problems in MacOS on local drive…

Thx,

(Merci pour la réponse… j’ai fini par trouver en fin d’après-midi)