Python Forum
Copy files from subfolders into same name of subfolders at other directory
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copy files from subfolders into same name of subfolders at other directory
#1
Hello everyone,

I need python script, which should be capable for copying files from different subfolders into new directory and this new directory should contain same subfolders. I am unable to create this sub_folders at destination during run time.
can anybody help me.

for example :
source_folder:
sub_folder1:
test1.txt
image1.jpg
sub_folder2:
test2.txt
image2.jpg
sub_folder3:
test3.txt
image3.jpg


destination_folder:
sub_folder1:
test1.txt
sub_folder1:
image1.jpg
sub_folder2:
test2.txt
sub_folder2:
image2.jpg
sub_folder3:
test3.txt
sub_folder3:
image3.jpg
Reply
#2
Please show what you  have tried so far, and where you are running into problems.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  deleting files in program files directory RRADC 6 2,816 Aug-21-2024, 06:11 PM
Last Post: snippsat
  Copy and Paste Files - Command MicheliBarcello 2 857 Jun-25-2024, 05:04 AM
Last Post: rodiongork
  Filer and sort files by modification time in a directory tester_V 5 2,211 May-02-2024, 05:39 PM
Last Post: tester_V
  Loop through all files in a directory? Winfried 10 3,974 Apr-23-2024, 07:38 PM
Last Post: FortuneCoins
  Why is the copy method name in python list copy and not `__copy__`? YouHoGeon 2 1,287 Apr-04-2024, 01:18 AM
Last Post: YouHoGeon
  Copy Paste excel files based on the first letters of the file name Viento 2 1,506 Feb-07-2024, 12:24 PM
Last Post: Viento
  uploading files from a ubuntu local directory to Minio storage container dchilambo 0 1,295 Dec-22-2023, 07:17 AM
Last Post: dchilambo
  change directory of save of python files akbarza 3 3,242 Jul-23-2023, 08:30 AM
Last Post: Gribouillis
  Using pyinstaller with .ui GUI files - No such file or directory error diver999 3 7,584 Jun-27-2023, 01:17 PM
Last Post: diver999
  Monitoring a Directory for new mkv and mp4 Files lastyle 3 2,704 May-07-2023, 12:33 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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