Sharing notes from my ongoing learning journey — what I build, break and understand along the way.
My Journey with PowerShell: Getting Comfortable with Folders, Files, and the Terminal
My Journey with PowerShell: Getting Comfortable with Folders, Files, and the Terminal
When I first opened the PowerShell terminal, the plain blue screen looked serious — and frankly, intimidating. But I had a clear goal:
I wanted to learn how to navigate folders, manage files, and perform basic tasks directly through the terminal.
So in the beginning, I repeated a simple cycle over and over again:
- Created folders and
.txt
files - Wrote content into them
- Modified the content
- Deleted them, re-created them, renamed them
- Deleted folders and cleaned up everything
I kept doing this because I wanted my hands to get used to the commands. I wanted to shift my brain from “click with the mouse” to “type it with confidence”. Repetition helped a lot.
Problems I Faced Along the Way
- I got “file in use” errors while trying to delete folders — turns out even having a folder open in Explorer can block removal.
- I wasn’t sure when to use
-Recurse
and-Force
withRemove-Item
, but I figured it out with trial and error. - OneDrive’s sync process would sometimes lock files. Pausing sync temporarily solved it.
Now I feel much more confident. PowerShell is no longer something I avoid — it’s a tool I reach for when I want to get things done quickly and precisely.
Want to Try This Yourself?
If you’re curious about PowerShell and want to get hands-on experience with file and folder management, here’s a beginner-friendly guide to get you started.
How to Open PowerShell
- Press
Win + R
, typepowershell
, then press Enter - OR: Search “PowerShell” in the Start menu and open it
Folder and File Basics
Task | Command |
---|---|
Show current directory | Get-Location |
Navigate to folder | Set-Location "FolderName" or cd |
Create new folder | New-Item -ItemType Directory -Name "FolderName" |
Create new file | New-Item -ItemType File -Name "file.txt" |
List folder contents | Get-ChildItem or ls |
List only .txt files | Get-ChildItem -Filter *.txt |
Working with File Contents
Task | Command |
---|---|
Write text to file (overwrite) | Set-Content -Path "file.txt" -Value "Hello" |
Append text to file | Add-Content -Path "file.txt" -Value "New line" |
Read file content | Get-Content file.txt |
Clear file content (keep file) | Clear-Content -Path file.txt |
Deleting Files and Folders
What to delete | Command |
---|---|
A file | Remove-Item file.txt |
A folder and its contents | Remove-Item FolderName -Recurse -Force |
Only folder contents (keep folder) | Remove-Item FolderName\* -Recurse -Force |
Copying and Moving
Task | Command |
---|---|
Copy a file | Copy-Item original.txt copy.txt |
Move a file | Move-Item file.txt FolderName\ |
Rename a file | Move-Item file.txt newname.txt |
Useful Commands
Command | Purpose |
---|---|
Test-Path file.txt | Check if file or folder exists |
Select-String -Path *.txt -Pattern "keyword" | Search for text in files |
echo "hello" | Write message to screen (CMD-style) |
Create a test folder on your desktop and open PowerShell inside it. Then practice each command multiple times.
Repetition is what turns syntax into second nature — and that’s when things really get fun.