UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Working With Spaces In Windows 10 Power Shell, Windows 10I'    
 
   
InfoHound
post Oct 16 2018, 02:32 PM
Post#1



Posts: 1,097
Joined: 1-December 12



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
This post has been edited by InfoHound: Oct 16 2018, 02:40 PM
Go to the top of the page
 
theDBguy
post Oct 16 2018, 02:46 PM
Post#2


Access Wiki and Forums Moderator
Posts: 73,738
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Try enclosing the whole path in quotes. For example:

cd "folder name with space\subfolder\subfolder"

Hope it helps...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
InfoHound
post Oct 16 2018, 02:55 PM
Post#3



Posts: 1,097
Joined: 1-December 12



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
Go to the top of the page
 
theDBguy
post Oct 16 2018, 03:00 PM
Post#4


Access Wiki and Forums Moderator
Posts: 73,738
Joined: 19-June 07
From: SunnySandyEggo


Hi,

What was the problem you're trying to solve?

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

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
InfoHound
post Oct 16 2018, 03:27 PM
Post#5



Posts: 1,097
Joined: 1-December 12



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.
Go to the top of the page
 
theDBguy
post Oct 16 2018, 03:31 PM
Post#6


Access Wiki and Forums Moderator
Posts: 73,738
Joined: 19-June 07
From: SunnySandyEggo


Continued success...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    16th November 2018 - 02:50 AM