Using File Explorer
Navigate Windows folders, show file extensions and hidden files, and read a folder's path two ways.
Novice · Operating System · Software Development · Updated
After this lesson you can
- Read a folder's path, go to it with the File Explorer address bar, and write it the Git Bash way
- Show file extensions and hidden items in File Explorer
Key takeaways
- A path is the full address of a folder or file, such as C:\Users\alex\Downloads. Each backslash separates one folder from the next.
- Type or paste a path into the File Explorer address bar and press Enter to go straight to that folder.
- Turn on file name extensions, so a file named index.html.txt can't pass itself off as index.html.
- Turn on hidden items to see the folders developers need, such as a project's .git folder.
- Git Bash writes the same home folder as /c/Users/alex, or just ~ for short.
Windows only. File Explorer is the Windows app for browsing files and folders. A folder is also called a directory. The two words mean the same thing in this course.
Open File Explorer
Press Windows+E. Select Downloads in the navigation pane on the left to find files you have downloaded.
You can drag and drop files to move them between folders, right-click a file to copy, rename, or delete it, and double-click to open it.
Read a path
The address bar at the top shows where you are. Click it to see the folder's path: the full address of a file or folder.
C:\Users\alex\Downloads
C: is the drive. Each backslash (\) separates one folder from the next. C:\Users\alex is your home folder, where your own files live. Your username will be different from alex.
You can also type or paste a path into the address bar and press Enter to go straight to that folder.
Show file extensions
A file's extension is the end of its name after the last period. .cs is C# source code, .java is Java source code, .html is a web page, and .txt is plain text. Windows hides extensions by default, which can trick you: a file called index.html.txt looks like index.html when extensions are hidden.
Turn them on: in File Explorer, select View > Show > File name extensions.
Show hidden items
Some files and folders are hidden because most people never need them. Developers do. For example, Git keeps a project's history in a hidden folder named .git.
Select View > Show > Hidden items. Hidden files now appear slightly faded.
The same folder, two ways
In File Explorer, your home folder is C:\Users\alex. In Git Bash, the terminal you will install soon, the same folder is written differently:
| Where | How it is written |
|---|---|
| File Explorer | C:\Users\alex |
| Git Bash | /c/Users/alex, or just ~ (the tilde means "my home folder") |
Git Bash uses forward slashes (/), like a Mac or Linux terminal, and writes the drive C: as /c. It is the same folder either way.
You can jump from the terminal to File Explorer at any time. In Git Bash, this command opens the folder you are in:
explorer .
The . means "the folder I am in now".
Check yourself
2 questions to try on the lesson page.
So what
Every tool you install from here on reads and writes files in folders. Knowing where a file lives, and what it is really called, saves you a lot of "file not found" trouble later.
Key terms
- Directory
- Absolute Path
- File Extension
- Home Directory