Python Forum
Moving Files From Subdirectories To Another Directory
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving Files From Subdirectories To Another Directory
#3
(Oct-06-2020, 07:02 AM)bowlofred Wrote: shutil.move() is expecting a string representing a filename or path, not a Path object. Most os file functions can take path-like objects, but I don't think shutil can.

You can call it with str(path) instead of just path.

I Have tried str(path)

But hey can you tell me how to move specific files from one dir to another dir
Reply


Messages In This Thread
RE: Moving Files From Subdirectories To Another Directory - by Harshil - Oct-06-2020, 07:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Filer and sort files by modification time in a directory tester_V 5 494 May-02-2024, 05:39 PM
Last Post: tester_V
  Loop through all files in a directory? Winfried 10 753 Apr-23-2024, 07:38 PM
Last Post: FortuneCoins
  uploading files from a ubuntu local directory to Minio storage container dchilambo 0 565 Dec-22-2023, 07:17 AM
Last Post: dchilambo
  change directory of save of python files akbarza 3 1,060 Jul-23-2023, 08:30 AM
Last Post: Gribouillis
  Using pyinstaller with .ui GUI files - No such file or directory error diver999 3 3,796 Jun-27-2023, 01:17 PM
Last Post: diver999
  Monitoring a Directory for new mkv and mp4 Files lastyle 3 1,775 May-07-2023, 12:33 PM
Last Post: deanhystad
  Read directory listing of files and parse out the highest number? cubangt 5 2,558 Sep-28-2022, 10:15 PM
Last Post: Larz60+
  How to save files in a separate directory Scordomaniac 3 2,329 Mar-16-2022, 10:17 AM
Last Post: Gribouillis
  Moving specific files then unzipping/decompressing christophereccles 2 2,427 Apr-24-2021, 04:25 AM
Last Post: ndc85430
  Moving files to Folders giddyhead 13 9,415 Mar-07-2021, 02:50 AM
Last Post: giddyhead

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020