# \[newbie\] windows renaming

**URL:** <https://www.ruby-forum.com/t/newbie-windows-renaming/125586>\
**Category:** Ruby\
**Created:** [January 10, 2008, 11:43am UTC](https://www.ruby-forum.com/t/newbie-windows-renaming/125586 "2008-01-10T11:43:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tnntwister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7feea3/32.png) [@tnntwister](https://www.ruby-forum.com/u/tnntwister)\
**Post date:** [January 10, 2008, 11:43am UTC](https://www.ruby-forum.com/t/newbie-windows-renaming/125586/1 "2008-01-10T11:43:08Z")

</div>

Hello,

i’m beginning to use Ruby, but i can’t find examples of renaming with  
the Dir class.

I’ve tried a code lign like this :

Dir.glob(“C:\Documents?and?Settings\NET?DESIGN\Mes?documents\Mes?images\*”)  
{ |name| `copy #{name} #{name.sub(/cadre/, "alias_")}`}

but nothing happens.

1. Is my url correct ?
2. how can i give orders to my windows ?

Thanks for your answers
