Power shell Command line for beginners. "move"
1. Switch Partitions (Drives): Use the drive letter followed by a colon.
- Syntax:
[Drive_Letter]: - Example:
C:\> E:
2. Move to a folder in the current path:
- Example:
C:\Users\me> cd myProjects - Result:
C:\Users\me\myProjects>
3. Move to a specific path (Absolute Path):
- Example:
C:\Users\me> cd E:\Programs - Result:
E:\Programs>(Note: In CMD, you might needcd /d E:\Programsto switch drives and folders at once).
4. Go back to the parent folder:
- Syntax:
cd ..(Make sure to add a space aftercd). - Example:
C:\Users\me\myProjects> cd .. - Result:
C:\Users\me>
5. Navigate back and forth using the Stack (pushd & popd):
- Example:
C:\Users\me> pushd E:\Programs(Saves current path and moves to E:\Programs)E:\Programs> popd(Returns you exactly where you were)
6. Pro Tip for PowerShell 7 users:
- Use
cd -to go back to the previous path (like Linux). - Use
cd ~to go directly to your Home directory.
7. Move to the Drive Root: To jump directly to the root of the current drive (e.g., C:\ or E:\):
- Command:
cd \ - Example:
C:\Users\me\Documents\Projects> cd \ - Result:
C:\>
u/Moh_Gh_DZ — 3 days ago