# 3.2 Files

## 3.2.1 Listing of files

File display works on a root basis. If we want to find subfolders in a specific folder, we have to navigate to it by typing the absolute path.

### 3.2.1.1 Syntax - Listing of files

CZ:

```python
sevcik.co_je_tu("path")
```

### 3.2.1.2 Example

<figure><img src="https://2292557272-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3ZzD47eqZU5EP64S0398%2Fuploads%2FrgGYYXbNmVLSwofbsFg8%2Fpng.PNG?alt=media&#x26;token=b8aff088-ad80-42df-8b47-ef6f65192699" alt=""><figcaption></figcaption></figure>

## 3.2.2 Openening files

Opening of files are same as listing root based, if you want to open any file, you need to write absolute path, wich ends with name of file. Don't forget the file suffix.

### 3.2.2.1 Syntax - Opening files

CZ:

```python
sevcik.otevri_soubor("path")
```

## 3.2.3 Copying of file

Copying a file takes the original file and copies it entirely to the destination folder. The result is the original file and a new file in the destination folder.

### 3.2.3.1 Example - Copying of file

```python
sevcik.zkopiruj_soubor_do("path to file to copy", "path to folder to paste path")
```

## 3.2.4 Deleting files

This command deletes individual files, again using the path from root.

```py
sevcik.smaz_to("path") 
```

When entering a command, confirmation is required.

**Console output:**

```cmd
&#> sevcik.smaz_to("C://users/user/downloads/python-3.14.2-amd64.exe") 
⚠️ Opravdu chceš smazat soubor?
C://users/vit.legat/downloads/python-3.14.2-amd64.exe
(ano/ne): ano
🗑️ Soubor byl úspěšně smazán: C://users/user/downloads/python-3.14.2-amd64.exe
```
