Jan-03-2020, 11:43 AM
Hello,
I wrote this code in eclipse / pydev. On running as Python Run it is throwing an error as
FileNotFoundError: [Errno 2] No such file or directory: 'TestEDI.txt'
Thanks !
Adi
I wrote this code in eclipse / pydev. On running as Python Run it is throwing an error as
FileNotFoundError: [Errno 2] No such file or directory: 'TestEDI.txt'
import os.path import shutil from os import path def main(): print ("file exist:"+str(path.exists("C:/Users/Desktop/TestEDI.txt"))) #Copy a file with new name newPath = shutil.copy('TestEDI.txt', 'C:/GNS082/Desktop/Test2Jan') print ("file exist at new destination:"+str(path.exists('C:/Users/Desktop/TestEDI.txt'))) if __name__== "__main__": main()Whats wrong with this code as it is working on my python IDLE on local system.
Thanks !
Adi