المدة الزمنية 4:22

Python move a file ️

بواسطة Bro Code
21 771 مشاهدة
0
826
تم نشره في 2020/12/21

Python move replace file tutorial example explained #python #move #replace #file import os source = "C:\\Users\\User\\Desktop\\source.txt" destination = "C:\\Users\\User\\Desktop\\destination.txt" try: if os.path.exists(destination): print("There is already a file there") else: os.replace(source,destination) print(source+" was moved") except FileNotFoundError: print(source+" was not found") Bro Code merch store: https://teespring.com/stores/bro-code-5

الفئة

عرض المزيد

تعليقات - 50