SlideShare a Scribd company logo
1 of 9
FILE PATHS AND
PROGRAMMING
SARAH BETH BENES
WHAT IS A FILE PATH?
• A program will first look in the current directory for
• data files
• module files
• Next it will look in a specified file path
• Your compiler has default paths for built in modules
• Advanced programming, you will want to specify your own
file paths
• For now, keep everything in the same directory
TWO WAYS TO SEE A FILE PATH
FILE EXPLORER - LIBRARIES FILE EXPLORER – DISK VIEW
TWO WAYS TO SEE A FILE PATH
FILE EXPLORER - LIBRARIES
• at the top it shows the file
path.
• Starting from “libraries”
• LibrariesDocuments
• STCPythonChapter Files
TWO WAYS TO SEE A FILE PATH
FILE EXPLORER - LIBRARIES FILE EXPLORER DISK VIEW
• at the top it shows the file
path.
• Starting from “c:”
• C:UsersPublicPublic
Documents
• STCPythonChapter Files
THE FILE PATH YOU NEED TO KNOW
•Both of these are the same file location
•You need to know the file path the computer
uses
•C:UsersPublicDocumentsSTCPythonChapt
er files
TO USE YOUR CURRENT LOCATION AS A
STARTING PLACE USE THE DOUBLE 
• STCPythonChapter
Files
• The problem with this
comes back to using a
space in a name
• Use good naming
conventions for your
disk, also
FLASH DRIVE
TO USE YOUR CURRENT LOCATION AS A
STARTING PLACE USE THE DOUBLE 
• STCPythonChapter
Files
• The problem with this
comes back to using a
space in a name
• Use good naming
conventions for your
disk, also
FLASH DRIVE
HOW TO SHARE IT
• If you are going to use your program on another computer
• Write the pathname relative to the drive it is on
• 
• Instead of a drive letter
• You will want to zip your entire folder, so that it can be
unzipped with the same relative locations
• See sample file

More Related Content

What's hot

File Handling
File HandlingFile Handling
File HandlingWaqar Ali
 
03 browsing the filesystem
03 browsing the filesystem03 browsing the filesystem
03 browsing the filesystemShay Cohen
 
Chapter 06
Chapter 06Chapter 06
Chapter 06 Google
 
"Hands Off! Best Practices for Code Hand Offs"
"Hands Off!  Best Practices for Code Hand Offs""Hands Off!  Best Practices for Code Hand Offs"
"Hands Off! Best Practices for Code Hand Offs"Naomi Dushay
 
TagFS — Tag Semantics for Hierarchical File Systems
TagFS — Tag Semantics for Hierarchical File SystemsTagFS — Tag Semantics for Hierarchical File Systems
TagFS — Tag Semantics for Hierarchical File Systemsguest52d7e8
 
Email Capture at the Radical Archives of Philadelphia
Email Capture at the Radical Archives of PhiladelphiaEmail Capture at the Radical Archives of Philadelphia
Email Capture at the Radical Archives of Philadelphiaarchivistsbeingawesome
 
Top school in noida
Top school in noidaTop school in noida
Top school in noidaEdhole.com
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSUnited International University
 
Jayse farrell resume
Jayse farrell resumeJayse farrell resume
Jayse farrell resumeJayse Farrell
 
Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools Vu Hung Nguyen
 

What's hot (20)

File Handling
File HandlingFile Handling
File Handling
 
03 browsing the filesystem
03 browsing the filesystem03 browsing the filesystem
03 browsing the filesystem
 
Chapter 06
Chapter 06Chapter 06
Chapter 06
 
"Hands Off! Best Practices for Code Hand Offs"
"Hands Off!  Best Practices for Code Hand Offs""Hands Off!  Best Practices for Code Hand Offs"
"Hands Off! Best Practices for Code Hand Offs"
 
Basic Make
Basic MakeBasic Make
Basic Make
 
TagFS — Tag Semantics for Hierarchical File Systems
TagFS — Tag Semantics for Hierarchical File SystemsTagFS — Tag Semantics for Hierarchical File Systems
TagFS — Tag Semantics for Hierarchical File Systems
 
Email Capture at the Radical Archives of Philadelphia
Email Capture at the Radical Archives of PhiladelphiaEmail Capture at the Radical Archives of Philadelphia
Email Capture at the Radical Archives of Philadelphia
 
File handling
File handlingFile handling
File handling
 
Contigious
ContigiousContigious
Contigious
 
File handling
File handlingFile handling
File handling
 
Command
CommandCommand
Command
 
Top school in noida
Top school in noidaTop school in noida
Top school in noida
 
Hw1
Hw1Hw1
Hw1
 
File carving overview
File carving overviewFile carving overview
File carving overview
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFS
 
Jayse farrell resume
Jayse farrell resumeJayse farrell resume
Jayse farrell resume
 
DLL Hijacking
DLL HijackingDLL Hijacking
DLL Hijacking
 
File organisation
File organisationFile organisation
File organisation
 
Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools Nguyễn Vũ Hưng: Basic Linux Power Tools
Nguyễn Vũ Hưng: Basic Linux Power Tools
 
Python file handling
Python file handlingPython file handling
Python file handling
 

Similar to File paths and programming

CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsCNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsSam Bowne
 
Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Ahmed El-Arabawy
 
CNIT 121: 13 Investigating Mac OS X Systems
CNIT 121: 13 Investigating Mac OS X SystemsCNIT 121: 13 Investigating Mac OS X Systems
CNIT 121: 13 Investigating Mac OS X SystemsSam Bowne
 
CNIT 152: 13 Investigating Mac OS X Systems
CNIT 152: 13 Investigating Mac OS X SystemsCNIT 152: 13 Investigating Mac OS X Systems
CNIT 152: 13 Investigating Mac OS X SystemsSam Bowne
 
File system discovery
File system discovery File system discovery
File system discovery DevMix
 
Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)FerryKemperman
 
Exploiting Directory Permissions on macOS
Exploiting Directory Permissions on macOSExploiting Directory Permissions on macOS
Exploiting Directory Permissions on macOSCsaba Fitzl
 
Perl Dist::Surveyor 2011
Perl Dist::Surveyor 2011Perl Dist::Surveyor 2011
Perl Dist::Surveyor 2011Tim Bunce
 
Dancing faster in the datasphere
Dancing faster in the datasphereDancing faster in the datasphere
Dancing faster in the datasphereJ T "Tom" Johnson
 
Powerpoint versiebeheer there is no such thing as a final version 1
Powerpoint versiebeheer there is no such thing as a final version 1Powerpoint versiebeheer there is no such thing as a final version 1
Powerpoint versiebeheer there is no such thing as a final version 1Hugo Besemer
 

Similar to File paths and programming (20)

CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsCNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
 
File System.pptx
File System.pptxFile System.pptx
File System.pptx
 
Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management
 
5263802.ppt
5263802.ppt5263802.ppt
5263802.ppt
 
Unix cmc
Unix cmcUnix cmc
Unix cmc
 
CNIT 121: 13 Investigating Mac OS X Systems
CNIT 121: 13 Investigating Mac OS X SystemsCNIT 121: 13 Investigating Mac OS X Systems
CNIT 121: 13 Investigating Mac OS X Systems
 
Linuxnishustud
LinuxnishustudLinuxnishustud
Linuxnishustud
 
CNIT 152: 13 Investigating Mac OS X Systems
CNIT 152: 13 Investigating Mac OS X SystemsCNIT 152: 13 Investigating Mac OS X Systems
CNIT 152: 13 Investigating Mac OS X Systems
 
File system discovery
File system discovery File system discovery
File system discovery
 
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
 
File system
File systemFile system
File system
 
10 File System
10 File System10 File System
10 File System
 
Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)
 
Exploiting Directory Permissions on macOS
Exploiting Directory Permissions on macOSExploiting Directory Permissions on macOS
Exploiting Directory Permissions on macOS
 
Os6
Os6Os6
Os6
 
Perl Dist::Surveyor 2011
Perl Dist::Surveyor 2011Perl Dist::Surveyor 2011
Perl Dist::Surveyor 2011
 
Dancing faster in the datasphere
Dancing faster in the datasphereDancing faster in the datasphere
Dancing faster in the datasphere
 
Powerpoint versiebeheer there is no such thing as a final version 1
Powerpoint versiebeheer there is no such thing as a final version 1Powerpoint versiebeheer there is no such thing as a final version 1
Powerpoint versiebeheer there is no such thing as a final version 1
 
Ch10 file system interface
Ch10   file system interfaceCh10   file system interface
Ch10 file system interface
 
Solr Recipes
Solr RecipesSolr Recipes
Solr Recipes
 

Recently uploaded

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 

Recently uploaded (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 

File paths and programming

  • 2. WHAT IS A FILE PATH? • A program will first look in the current directory for • data files • module files • Next it will look in a specified file path • Your compiler has default paths for built in modules • Advanced programming, you will want to specify your own file paths • For now, keep everything in the same directory
  • 3. TWO WAYS TO SEE A FILE PATH FILE EXPLORER - LIBRARIES FILE EXPLORER – DISK VIEW
  • 4. TWO WAYS TO SEE A FILE PATH FILE EXPLORER - LIBRARIES • at the top it shows the file path. • Starting from “libraries” • LibrariesDocuments • STCPythonChapter Files
  • 5. TWO WAYS TO SEE A FILE PATH FILE EXPLORER - LIBRARIES FILE EXPLORER DISK VIEW • at the top it shows the file path. • Starting from “c:” • C:UsersPublicPublic Documents • STCPythonChapter Files
  • 6. THE FILE PATH YOU NEED TO KNOW •Both of these are the same file location •You need to know the file path the computer uses •C:UsersPublicDocumentsSTCPythonChapt er files
  • 7. TO USE YOUR CURRENT LOCATION AS A STARTING PLACE USE THE DOUBLE • STCPythonChapter Files • The problem with this comes back to using a space in a name • Use good naming conventions for your disk, also FLASH DRIVE
  • 8. TO USE YOUR CURRENT LOCATION AS A STARTING PLACE USE THE DOUBLE • STCPythonChapter Files • The problem with this comes back to using a space in a name • Use good naming conventions for your disk, also FLASH DRIVE
  • 9. HOW TO SHARE IT • If you are going to use your program on another computer • Write the pathname relative to the drive it is on • • Instead of a drive letter • You will want to zip your entire folder, so that it can be unzipped with the same relative locations • See sample file