using Scite to change directory

M

mosar

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
 
H

Harry

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
Try this

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

Harry
 
M

mosar

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?
 
H

Harry

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
 
P

Phrogz

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,235
Messages
2,571,181
Members
47,817
Latest member
BartHeckma

Latest Threads

Top