Files and Folders: A Practical Guide for Windows and macOS

A computer’s filesystem is simply the system it uses to organize files into folders. If you understand where you are in that folder structure, and how to move from one folder to another, the filesystem becomes much less mysterious.

A file is an individual item such as a Python program, CSV file, image, PDF, or Word document. A folder is a container that can hold files and other folders. Be advised that the term directory is an exact synonym of folder which is used by many systems. You’ll often hear Stephen use the word “directory” in class: you can mentally substitute “folder” if you like.

Next, realize that you can look at the same filesystem in two different ways:

These are not two different filesystems. They are two different ways of looking at the same files and folders.


Windows

1. File Explorer: the visual view of your filesystem

On Windows, the main program for viewing files and folders is called File Explorer.

You can open it in several ways:

File Explorer shows folders and files visually. You can double-click a folder to enter it and double-click a file to open it.

2. Your user folder

Windows gives each user an individual folder. It is normally located at:

C:\Users\YourName

For example, if your Windows username were filbert, your user folder would normally be:

C:\Users\filbert

Inside your user folder are several common folders that Windows and other programs use automatically. The most important ones are usually:

Desktop
Documents
Downloads
Pictures

So, for example, your Downloads folder is normally:

C:\Users\YourName\Downloads

and your Documents folder is normally:

C:\Users\YourName\Documents

The backslash (\) separates one folder name from the next in a Windows path.

3. How to know where you are in File Explorer

Near the top of a File Explorer window is the address bar. It tells you which folder you are currently viewing.

For example, you might see something resembling:

This PC > Local Disk (C:) > Users > filbert > Downloads

That is the visual version of the path:

C:\Users\filbert\Downloads

You can click parts of the address bar to move upward to a containing folder.

A particularly useful trick is to click in the blank area of the address bar (or press Ctrl+L). The breadcrumb-style display will change into the actual full path as ordinary text. For example:

C:\Users\filbert\Downloads

You can then press Ctrl+C to copy that path and paste it somewhere else. This is especially handy when you are looking at the folder you want in File Explorer and need to give that same folder to PowerShell. For example, after copying the path above, you could type cd in PowerShell, paste the path, and press Enter.

The left side of File Explorer also normally contains shortcuts to common locations such as Desktop, Documents, and Downloads.

4. Where downloaded files go

When you download a file from a web browser, Windows browsers normally save it in your Downloads folder unless:

So if you download a file named:

paperclip_collection.csv

it will normally end up at:

C:\Users\YourName\Downloads\paperclip_collection.csv

To find it visually:

  1. Open File Explorer.
  2. Click Downloads in the left sidebar.
  3. Look for the downloaded file.

Many browsers also have a downloads button or downloads list. That can help you confirm the filename, but the file itself still lives somewhere in your filesystem.

5. Opening another folder

Suppose you have a course folder here:

C:\Users\YourName\DATA419-labs

You can navigate there visually by opening:

C:

then:

Users

then your username, and finally:

DATA419-labs

You can also click the File Explorer address bar, type the complete path:

C:\Users\YourName\DATA419-labs

and press Enter.

6. Copying and moving files

Suppose this file is in Downloads:

C:\Users\YourName\Downloads\paperclip_collection.csv

and you want it in:

C:\Users\YourName\DATA419-labs

To copy it

  1. Open the Downloads folder in File Explorer.
  2. Click the file once to select it.
  3. Press Ctrl+C.
  4. Navigate to DATA419-labs.
  5. Press Ctrl+V.

Now there are two copies of the file: one in Downloads and one in DATA419-labs.

To move it

  1. Open the Downloads folder.
  2. Select the file.
  3. Press Ctrl+X.
  4. Navigate to DATA419-labs.
  5. Press Ctrl+V.

Now the file has been removed from Downloads and placed in DATA419-labs.

You can also drag files from one folder to another with the mouse, although copy-and-paste or cut-and-paste is often easier to understand when you are first learning.

7. PowerShell: the command-line view

Windows also lets you work with the filesystem through PowerShell.

To open it:

  1. Open the Start menu.
  2. Search for PowerShell.
  3. Open Windows PowerShell or PowerShell, depending on your system.

PowerShell always has a current working folder. This is the folder that PowerShell is currently “inside.”

To see your current working folder, type:

pwd

You might see something like:

Path
----
C:\Users\filbert

This means PowerShell is currently looking at:

C:\Users\filbert

That is the same folder you could open visually in File Explorer.

8. Seeing the contents of the current folder

In PowerShell, type:

ls

This displays the files and folders inside your current working folder.

For example, if pwd says:

C:\Users\filbert

then ls is showing the same contents that File Explorer would show if its address bar were at:

C:\Users\filbert

9. Changing the working folder

Use cd, which means change directory. Here, “directory” is simply another word for “folder.”

To go into Downloads:

cd Downloads

Then:

pwd

should show:

C:\Users\filbert\Downloads

To go back up one level:

cd ..

The two dots mean “the folder that contains this folder.”

You can also change directly to a complete path:

cd C:\Users\filbert\DATA419-labs

If a folder name contains spaces, put the path in quotes:

cd "C:\Users\filbert\My Course Files"

10. Connecting File Explorer and PowerShell

The most important idea is this:

The folder shown in File Explorer and the working folder in PowerShell are locations in the same filesystem.

For example, suppose File Explorer is showing:

C:\Users\filbert\DATA419-labs

If you want PowerShell to work in that same folder, use:

cd C:\Users\filbert\DATA419-labs

Then confirm with:

pwd

and view its contents with:

ls

If you create, copy, move, rename, or delete a file in File Explorer, that change is visible in PowerShell. If you change the filesystem using PowerShell, the change is visible in File Explorer.

They are two views of the same thing.

11. A complete Windows example

Suppose your instructor tells you to download data.csv and place it in your DATA419-labs folder.

A normal workflow would be:

  1. Download data.csv in your web browser.

  2. Open File Explorer with Windows key + E.

  3. Click Downloads.

  4. Find data.csv.

  5. Cut it with Ctrl+X.

  6. Navigate to:

    C:\Users\YourName\DATA419-labs
  7. Paste it with Ctrl+V.

  8. Open PowerShell.

  9. Change to the same folder:

    cd C:\Users\YourName\DATA419-labs
  10. Confirm your location:

    pwd
  11. Confirm that the file is there:

    ls

At this point, File Explorer and PowerShell should both show that data.csv is inside your DATA419-labs folder.


macOS

1. Finder: the visual view of your filesystem

On a Mac, the main program for viewing files and folders is called Finder.

Finder is normally always available. Its icon looks like a two-tone smiling face and is usually located at the left side of the Dock.

Click the Finder icon to open a Finder window.

Finder shows folders and files visually. You can double-click a folder to enter it and double-click a file to open it.

2. Your home folder

macOS gives each user an individual home folder. It is normally located at:

/Users/yourname

For example, if your macOS username were filbert, your home folder would normally be:

/Users/filbert

Inside your home folder are several common folders that macOS and other programs use automatically. The most important ones are usually:

Desktop
Documents
Downloads
Pictures

So your Downloads folder is normally:

/Users/yourname/Downloads

and your Documents folder is normally:

/Users/yourname/Documents

The forward slash (/) separates one folder name from the next in a macOS path.

3. How to know where you are in Finder

Finder normally provides shortcuts to common folders such as Desktop, Documents, and Downloads in its sidebar.

To make Finder show the folder path more explicitly, choose:

View > Show Path Bar

The path bar appears near the bottom of the Finder window and shows where the current folder is located.

For example, if you are viewing your Downloads folder, its full path might be:

/Users/filbert/Downloads

You can also press:

Command+Shift+G

to open Go to Folder, then type a path directly.

For example:

/Users/filbert/DATA419-labs

and press Enter.

4. Where downloaded files go

When you download a file from a web browser, macOS browsers normally save it in your Downloads folder unless:

So if you download:

paperclip_collection.csv

it will normally end up at:

/Users/yourname/Downloads/paperclip_collection.csv

To find it visually:

  1. Open Finder.
  2. Click Downloads in the sidebar.
  3. Look for the downloaded file.

The browser may also show a downloads list, but the downloaded file itself is stored somewhere in your filesystem.

5. Opening another folder

Suppose you have a course folder here:

/Users/yourname/DATA419-labs

You can navigate to it in Finder by first opening your home folder and then opening DATA419-labs.

You can also press:

Command+Shift+G

enter:

/Users/yourname/DATA419-labs

and press Enter.

6. Copying and moving files

Suppose this file is in Downloads:

/Users/yourname/Downloads/paperclip_collection.csv

and you want it in:

/Users/yourname/DATA419-labs

To copy it

  1. Open Downloads in Finder.
  2. Click the file once to select it.
  3. Press Command+C.
  4. Navigate to DATA419-labs.
  5. Press Command+V.

Now there are two copies of the file.

To move it

Finder’s keyboard shortcut for moving is slightly different from Windows.

  1. Open Downloads.
  2. Select the file.
  3. Press Command+C.
  4. Navigate to DATA419-labs.
  5. Press Option+Command+V.

This moves the file to the new folder instead of leaving a copy behind.

You can also drag a file from one folder to another using the mouse or trackpad.

7. Terminal: the command-line view

macOS also lets you work with the filesystem through Terminal.

One easy way to open Terminal is:

  1. Press Command+Space to open Spotlight.
  2. Type Terminal.
  3. Press Enter.

Terminal always has a current working folder. This is the folder that Terminal is currently “inside.”

To see your current working folder, type:

pwd

You might see:

/Users/filbert

This means Terminal is currently working in your home folder.

That is the same folder that Finder can show visually.

8. Seeing the contents of the current folder

In Terminal, type:

ls

This displays the files and folders inside your current working folder.

For example, if pwd says:

/Users/filbert

then ls is showing the same folder contents that Finder would show when viewing:

/Users/filbert

9. Changing the working folder

Use cd, which means change directory. A directory is simply a folder.

To go into Downloads:

cd Downloads

Then:

pwd

should show:

/Users/filbert/Downloads

To go back up one level:

cd ..

The two dots mean “the folder that contains this folder.”

You can also change directly to a complete path:

cd /Users/filbert/DATA419-labs

If a folder name contains spaces, put the path in quotes:

cd "/Users/filbert/My Course Files"

10. Your home folder and ~

On macOS, the symbol:

~

is a shortcut meaning “my home folder.”

So if your home folder is:

/Users/filbert

then these two commands refer to the same folder:

cd /Users/filbert/Downloads
cd ~/Downloads

Likewise:

cd ~/DATA419-labs

means “go to the DATA419-labs folder inside my home folder.”

11. Connecting Finder and Terminal

The most important idea is this:

The folder shown in Finder and the working folder in Terminal are locations in the same filesystem.

Suppose Finder is showing:

/Users/filbert/DATA419-labs

If you want Terminal to work in that same folder, use:

cd /Users/filbert/DATA419-labs

or:

cd ~/DATA419-labs

Then confirm with:

pwd

and view its contents with:

ls

If you create, copy, move, rename, or delete a file in Finder, that change is visible in Terminal. If you make a change using Terminal, that change is visible in Finder.

They are two views of the same thing.

12. A complete macOS example

Suppose your instructor tells you to download data.csv and place it in your DATA419-labs folder.

A normal workflow would be:

  1. Download data.csv in your web browser.

  2. Open Finder.

  3. Click Downloads.

  4. Find data.csv.

  5. Copy it with Command+C.

  6. Navigate to DATA419-labs.

  7. Move the file there with Option+Command+V.

  8. Open Terminal.

  9. Change to the same folder:

    cd ~/DATA419-labs
  10. Confirm your location:

    pwd
  11. Confirm that the file is there:

    ls

At this point, Finder and Terminal should both show that data.csv is inside your DATA419-labs folder.