Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

move.py 406 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  1. import os
  2. import shutil
  3. folders = os.listdir("filelists/inat/val")
  4. for folder in folders:
  5. full_folder = os.path.join("filelists/inat/val", folder)
  6. files = os.listdir(full_folder)
  7. print("Processing %s" % (full_folder))
  8. for file in files:
  9. full_file = os.path.join(full_folder, file)
  10. shutil.move(full_file, "filelists/inat/images/" + file)
  11. shutil.rmtree(full_folder)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...