# Help

**URL:** <https://www.ruby-forum.com/t/help/178592>\
**Category:** Ruby\
**Created:** [November 7, 2009, 10:19am UTC](https://www.ruby-forum.com/t/help/178592 "2009-11-07T10:19:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [November 7, 2009, 10:19am UTC](https://www.ruby-forum.com/t/help/178592/1 "2009-11-07T10:19:02Z")

</div>

Topic: How can i go about thisi want to move the folders which is older  
than 2 days from the current date.  
how can i go for the implementation.  
my folder structure is d:/MoveFiles/2009-10-31/g.html

```
Any helps on this
```

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [November 7, 2009, 1:38pm UTC](https://www.ruby-forum.com/t/help/178592/2 "2009-11-07T13:38:39Z")

</div>

On Sat, Nov 7, 2009 at 10:19 AM, Newb N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Topic: How can i go about thisi want to move the folders which is older  
> than 2 days from the current date.

Look at the docs for File#mtime and the Dir class, that should help:

[http://ruby-doc.org/core/classes/File.html#M002548](http://ruby-doc.org/core/classes/File.html#M002548)  
[http://ruby-doc.org/core/classes/Dir.html](http://ruby-doc.org/core/classes/Dir.html)

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [November 7, 2009, 2:24pm UTC](https://www.ruby-forum.com/t/help/178592/3 "2009-11-07T14:24:03Z")

</div>

Michael K. wrote:

> On Sat, Nov 7, 2009 at 10:19 AM, Newb N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > Topic: How can i go about thisi want to move the folders which is older  
> > than 2 days from the current date.
> 
> Look at the docs for File#mtime and the Dir class, that should help:
> 
> [class File - RDoc Documentation](http://ruby-doc.org/core/classes/File.html#M002548)  
> [class Dir - RDoc Documentation](http://ruby-doc.org/core/classes/Dir.html)

Thank u  
god it working
