Skip to content

Commit bb3466a

Browse files
committed
v4.1 Cambio copy to move
Se cambia metodo copy por move
1 parent 643945a commit bb3466a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

WorkingWithFiles.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# !/usr/bin/python3
22
# coding: utf8
33
# @author Bulls90
4-
# v4.0
4+
# v4.1
55
# Importing modules
66
import os
77
import shutil
@@ -41,7 +41,7 @@ def classify_new_name():
4141
msgInt += 1
4242
msgName = msgName[:8] + str(msgInt)
4343
newFileName = foldername + '\\' + msgName + '.xml'
44-
shutil.copy(os.path.join(src, f), newFileName)
44+
shutil.move(os.path.join(src, f), newFileName)
4545

4646

4747
# Creates folders by file name, and then moves the files to the corresponding folder keeping original filenames.
@@ -54,7 +54,7 @@ def classify():
5454
foldername = topic + '_' + 'Status_' + status
5555
if not os.path.exists(foldername):
5656
os.mkdir(foldername)
57-
shutil.copy(os.path.join(src, f), foldername)
57+
shutil.move(os.path.join(src, f), foldername)
5858

5959

6060
def question():

0 commit comments

Comments
 (0)