Python newbie. Need some help with a simple file copy app/script.
Ask user to select files (may include directories) and then copy all selected to a destination directory recursively (create sub-directories if required. .
I am able to select and copy only files using the code below' (sample code snippet)
Not sure how to select both files and directories in a go and start copy.
import tkinter.filedialog as fd
import os
import shutil
files=fd.askopenfilenames() # user selects files
for item in files:
shutil.copy(item, dest_path) # destination path is predefined. say C:/testdir/