Hi,
I have created a script to move some files(pdf) from a directory to another one, but when the file that I want to move is in use it automaticaly copy the file to the new destination. I don't want to copy the file. There is a way to not move and copy the file when is in use?
here is part of my script.
Thank You
I have created a script to move some files(pdf) from a directory to another one, but when the file that I want to move is in use it automaticaly copy the file to the new destination. I don't want to copy the file. There is a way to not move and copy the file when is in use?
here is part of my script.
Code:
for DefaultUserName in Final_MoveToRightPerson_Dict:
for DrawingName in Final_MoveToRightPerson_Dict[DefaultUserName]:
try:
if DrawingName in ExistingCopy_List:
ShopDrawingExisting_Module(DrawingName)
else:
Old_PATH = ShopDrawingControl_PATH + "#1 First Copy/" + str(DrawingName)
New_PATH = ShopDrawingControl_PATH + "#4 User List/" + str(DefaultUserName) + "/To Check/" + str(DrawingName)
try:
shutil.move(Old_PATH, New_PATH)
Continue = True
except:pass
DrawingInformation_Module(DrawingName, "Move To Check", str(UserList_listbox.Get()))
except:pass
Comment