I have a specific problem in python. Below is my folder structure.
dstfolder/slave1/slave
I want the contents of \'slave\' folder to
\'slave\'
Example using the os and shutil modules:
from os.path import join from os import listdir, rmdir from shutil import move root = 'dstfolder/slave1' for filename in listdir(join(root, 'slave')): move(join(root, 'slave', filename), join(root, filename)) rmdir(root)