Skip to content

Commit d50a5ad

Browse files
authored
Update README.md
1 parent f14f6da commit d50a5ad

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,19 @@ with open('file.txt', 'w') as file:
211211
```python
212212
file("file.txt").replace("abcd", "ram")
213213
```
214+
215+
<h2>Copy Contents of a Folder</h2>
216+
217+
<h3>Default Python</h3>
218+
219+
```python
220+
files = os.listdir("contents")
221+
for file in files:
222+
shutil.copy(os.path.join("contents", file), os.path.join("other_content", "test_folder", file))
223+
```
224+
225+
<h3>PyBetterFileIO</h3>
226+
227+
```python
228+
folder("contents").copy_contents_to("other_content/test_folder")
229+
```

0 commit comments

Comments
 (0)