Current Directory

noun

say it: “KUR-ent dih-REK-tuh-ree” /ˈkɜːrənt dɪˈrɛktəri/

The folder a program counts as "here" while it runs; relative paths start from it.

What is Current Directory?

Current Directory — The folder a program counts as "here" while it runs. A relative path such as data.csv is looked for in this folder, so the same program can find a file from one folder and not from another.

Console.WriteLine(Directory.GetCurrentDirectory());
string[] lines = File.ReadAllLines("books.csv"); // looked for in that folder

In a sentence

  • “The program couldn't find books.csv because the current directory was the bin folder.”

Level: Apprentice · More Operating System terms at this level

Updated