File size: 396 Bytes
37b054e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
import shutil

src = r"e:\programs2\openenv(RL)\devops_sandbox"
dst = r"e:\programs2\openenv(RL)"

for item in os.listdir(src):
    s = os.path.join(src, item)
    d = os.path.join(dst, item)
    if os.path.exists(d):
        if os.path.isdir(d):
            shutil.rmtree(d, ignore_errors=True)
        else:
            os.remove(d)
    shutil.move(s, d)

print("Moved successfully")