Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Other Microsoft Products _ Working With Spaces In Windows 10 Power Shell

Posted by: InfoHound Oct 16 2018, 02:32 PM

I'm trying to change directories in Windows 10 Powershell, but, the first directory name as a space in it.

PS C:\Users\user\temp> cd 'House Accounts'/ MackStreet/ DoraStreet

The House Accounts directory prevents the line from running. I used "House Accounts"/ .../... as well

Thanks

Posted by: theDBguy Oct 16 2018, 02:46 PM

Hi,

Try enclosing the whole path in quotes. For example:

cd "folder name with space\subfolder\subfolder"

Hope it helps...

Posted by: InfoHound Oct 16 2018, 02:55 PM

Can I still use other commands like : pushd and popd.

I just started learning Powershell today. I could just change the Dir name but that would defeat the purpose of learning how to solve this problem

Thanks

Posted by: theDBguy Oct 16 2018, 03:00 PM

Hi,

What was the problem you're trying to solve?

To use pushd, you'll still need to provide the directory path/name.

Posted by: InfoHound Oct 16 2018, 03:27 PM

I just tried it and it works fine.

My home directory seems to be C:\Users\user
My screen shows C:\Users\user> I thought if I included it in my statement it would fail, but, it works fine.

Thanks Again.

Posted by: theDBguy Oct 16 2018, 03:31 PM

Continued success...

Posted by: KathyDoyle Feb 23 2019, 06:43 AM

So have you resolved your problem? I tried as guys recommended and everything worked. Maybe you have any other additional impact? Or just a detail that influences the result greatly? Please, try one more time and provide feedback. It is rather interesting to resolve such tasks.
-------------------------------------------------------------------------------------------------------
Essays at: https://eduzaurus.com/write-my-research-paper