Bash dosent allow to enter Program files Directory

  • viji19812001
  • Newbie
  • Newbie
  • viji19812001
  • Posts: 10

Post 3+ Months Ago

Hi,

The Problem is only with bash prompt.
When I go to c: and do an ls it lists program files under it.
but when I do cd Program files or cd Program~
it throws an error no such file or directory.
It doesn't recognise or allow me to enter the folder....

In case its a space problem how do I give the cd command to get into the folder.
Please suggest me.

Regards,
vijaya.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6252
  • Loc: Seattle, WA

Post 3+ Months Ago

I believe joebert mentioned this in another topic of yours; I hope you took the time to read it.

Surround the directory name in double quotes:
Quote:
cd "Program Files"
  • VideoRipper
  • Novice
  • Novice
  • VideoRipper
  • Posts: 15

Post 3+ Months Ago

...Or use its DOS-8.3 name:
Code: [ Select ]
 
cd progra~1
  1.  
  2. cd progra~1

(so without the m in program)

Another thing you could have (XP with very strict rules or Vista)
is that you don't have access rights to that folder.
(Just a wild guess...)

Greetz,

Peter.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Does Windows even have a "bash" prompt ?
I thought it was the "Command Prompt" or "DOS Box" on Windows.

Now I'm just confused. :scratchhead:
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6809
  • Loc: Martinsburg, WV

Post 3+ Months Ago

Apparently there is bash for Windows. But honestly, if you want to run unix commands why don't you just install Linux. Trying to get unix programs to run on Windows sounds about as fun as pissing into a strong wind.
  • viji19812001
  • Newbie
  • Newbie
  • viji19812001
  • Posts: 10

Post 3+ Months Ago

Hi,

Its not that I need to use bash in windows or Iam forcing myself to use windows. Its a sequence of installation steps which I have to run in windows environment.

They need me to run a file bash.exe which takes me to a bash prompt.

In the bash prompt i need to give make command
From here it directly searches for few files in program files directory So I have no control to specify "Program Files" or Program~1 ,It just directly searches and throws an error "Program Files" no such file or directory.

Also If I try to list cd Program~1 it dosent work.
Could it be a permission problem like what one of them mentioend.
Please let me know.
  • filth
  • Born
  • Born
  • filth
  • Posts: 1

Post 3+ Months Ago

It sounds like you're installing something like the openSSH server on Windows, or something else involving Cygwin which has Linux-oriented instructions with it. If that's the case, I'd try something like copSSH instead which has a much nicer installer than anything Cygwin-based.

Anyway, onto your question. Your options are as outlined already:

1. cd progra~1
2. cd "program files"

You can also try tab-completion, which is supported by any recent OS version (NT5 and above):

3. cd p [and then press Tab]

Tab-completion will ensure that Windows expands the folder name into one suitable for it. As a final option, you can write a batch script to cd into the folder for you, and test it locally, in case it's a problem with how your're connecting to the Windows command line. Then you would only have to do this:

4. C:/batch.bat [assuming your file was saved to the root of C: and named "batch.bat"]. It would simply contain the text as in option 2, or even the full path to your target directory if you want, that would make it so much quicker.

Incidentally, if it is SSH via Cygwin, take my advice and install copSSH. If you do, though, you'll be greeted with a bash prompt when logging in. Simply type "cmd" (without the quotes) to drop to the Windows command line, and then "exit" (again, without the quotes) to move back to the bash prompt. Good luck!
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

You could also type:

dir

to see what files/directories show up. Maybe you could then at least see if the program files directory is listed.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 62 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.