# Using Scite to change directory

**URL:** <https://www.ruby-forum.com/t/using-scite-to-change-directory/87298>\
**Category:** Ruby\
**Created:** [March 1, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298 "2007-03-01T15:15:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 1, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/1 "2007-03-01T15:15:39Z")

</div>

I tried this command without success:

Dir.chdir (D)

I shall I proceed ?

mosar

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 1, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/2 "2007-03-01T15:50:42Z")

</div>

mosar wrote:

> I tried this command without success:
> 
> Dir.chdir (D)
> 
> I shall I proceed ?
> 
> mosar

[http://www.ruby-doc.org/core](http://www.ruby-doc.org/core)

Did you read this documentation ?

Thanks

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 3, 2007, 1:32pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/3 "2007-03-03T13:32:40Z")

</div>

“mosar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> […]
> 
> I am coming again with my littler problem. I tried exactly this  
> command:  
> Dir.chdir(“C:\Documents and Settings\Jean\Bureau”) and the answer was:
> 
> “No such file or directory.”  
> I know that this path is correct and that the files exist because I  
> have tested it with the command window.  
> I am making a little syntax error but how ?

Inside of double quotes, the backslash character is an “escape  
character”, which means that it causes the following character to be  
handled literally, or in some cases, in a special manner. You need to  
“escape” every backslash character that lives inside of double quotes if  
you want it to be taken literally. Since this escape character is a  
backslash, that means that you need to double the backslashes in this  
example; i.e.,

Dir.chdir(“C:\Documents and Settings\Jean\Bureau”)

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 3, 2007, 1:05pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/4 "2007-03-03T13:05:39Z")

</div>

On 1 mar, 15:48, Stephane W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> mosar wrote:
> 
> > I tried this command without success:
> 
> > Dir.chdir (D)
> 
> > I shall I proceed ?
> 
> > mosar

> [RDoc Documentation](http://www.ruby-doc.org/core)
> 
> Did you read this documentation ?
> 
> Thanks

I am coming again with my littler problem. I tried exactly this  
command:  
Dir.chdir(“C:\Documents and Settings\Jean\Bureau”) and the answer was:

“No such file or directory.”  
I know that this path is correct and that the files exist because I  
have tested it with the command window.  
I am making a little syntax error but how ?

mosar

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 3, 2007, 2:50pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/5 "2007-03-03T14:50:47Z")

</div>

On 3 mar, 13:32, Harry [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 3, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/6 "2007-03-03T13:33:40Z")

</div>

> 

Try this

Dir.chdir(“C:\Documents and Settings\Jean\Bureau”)

Harry

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 3, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/7 "2007-03-03T15:00:48Z")

</div>

On 3 mar, 14:49, “mosar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > mosar
> 
> > Try this
> 
> > Dir.chdir(“C:\Documents and Settings\Jean\Bureau”)
> 
> > Harry  
> > –[Kakueki.com is for sale | HugeDomains](http://www.kakueki.com/ruby/list.html)  
> > Japanese Ruby List Subjects in English

Its OK. I have no message.But now I am trying Dir.entries with the  
same files.Dir.entries(C:\Documents and Settings\Jean\Bureau")I  
have no answer.Can you help me?

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 3, 2007, 3:10pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/8 "2007-03-03T15:10:59Z")

</div>

On 3/3/07, mosar [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > I am making a little syntax error but how ?
> 
> Its OK. I have no message.But now I am trying Dir.entries with the  
> same files.Dir.entries(C:\Documents and Settings\Jean\Bureau")I  
> have no answer.Can you help me?

Dir.entries(C:\Documents and Settings\Jean\Bureau")

should be

Dir.entries(“C:\Documents and Settings\Jean\Bureau”)  
Add quote at beginning.

Harry

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 3, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/9 "2007-03-03T15:31:02Z")

</div>

On Mar 3, 5:32 am, Harry [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Try this
> 
> Dir.chdir(“C:\Documents and Settings\Jean\Bureau”)

Or  
Dir.chdir( “C:/Documents and Settings/Jean/Bureau” )

Even though Windows normally uses a backslash for directory path  
separator, Ruby allows the forward slash in (almost?) all cases.

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 3, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298/10 "2007-03-03T22:41:52Z")

</div>

“Phrogz” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> […]
> 
> Or  
> Dir.chdir( “C:/Documents and Settings/Jean/Bureau” )
> 
> Even though Windows normally uses a backslash for directory path  
> separator, Ruby allows the forward slash in (almost?) all cases.

Windows actually allows it, as well. Forward slash been accepted all  
the way back to the days of MS-DOS, except for arguments on the command  
line of varios MS-DOS and Windows utilities. That’s because the forward  
slash is used there as a command-line option indicator. But from within  
programs, pathnames in Windows and MS-DOS allow forward or backward  
slashes, interchangeably.
