Working with Files

Claude Code can create, read, edit, and delete files. Understanding how to direct these operations makes you much more effective.

Common File Operations

Creating Files

"Create a new file called Header.jsx in the components folder"

Reading Files

"Read the contents of package.json and explain what dependencies we have"

Editing Files

"In Header.jsx, change the logo text from 'MyApp' to 'TaskFlow'"

Deleting Files

"Delete the old-component.jsx file, we don't need it anymore"

Folder Structure Tips

  • Always be specific about paths: "in the components folder" not just "create a file"
  • Ask Claude to "show me the current folder structure" when you're unsure
  • Use relative paths: "in the same folder as App.jsx"

💡 Pro Tip

When in doubt, ask Claude: "What files exist in this project?" or "Show me the project structure." Claude can read directories and give you an overview.