Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71851

Re: Copying non-existing files

From Peter Otten <__peter__@web.de>
Subject Re: Copying non-existing files
Date 2014-05-21 12:15 +0200
Organization None
References (7 earlier) <mailman.10157.1400602844.18130.python-list@python.org> <2122e5a9-198d-4998-bebf-3f19fe110f57@googlegroups.com> <99a414b6-0d02-40ac-9891-e179ff296db8@googlegroups.com> <mailman.10182.1400663582.18130.python-list@python.org> <8389c3e9-1fa5-43a5-bee5-c64fe4ee0919@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.10185.1400667342.18130.python-list@python.org> (permalink)

Show all headers | View raw


Satish ML wrote:

[You're back to turd-formatted text; please find a permanent fix for this]

>  C:\Desktop\salingeg\dest\code > Traceback (most recent call last): > File
>  "C:\Users\salingeg\Desktop\excel_1.py", line 24, in <module> > shut
>  il.copy(s, d) > File "C:\Program Files (x86)\python26\lib\shutil.py",
>  line 84, in copy > copyfile(src, dst) > File "C:\Program Files
>  (x86)\python26\lib\shutil.py", line 50, in > copyfile > with open (src,
>  'rb') as fsrc: > IOError: [Errno 2] No such file or directory: >
>  u'C:\\Desktop\\salingeg\\src\\code\\a.c' According to the error message
>  the file you are trying to copy doesn't exist. Have a look into the
>  C:\Desktop\salngeg\src\code folder, and check whether a file called a.c
>  is there. If not you have three options - add the file - remove the line
>  from the excel file - modify the code to check if the *source* file
>  exists
> 
> Hi,
> 
> Source file exists in the directory.

If you are *really* sure about this (please double-check) it may be a rights 
issue. Then make sure the user running the script has reading rights for the 
file.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. satishmlwizpro@gmail.com - 2014-05-18 23:53 -0700
  Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Chris Angelico <rosuav@gmail.com> - 2014-05-19 17:01 +1000
    Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Satish ML <satishmlwizpro@gmail.com> - 2014-05-19 01:08 -0700
    Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Satish ML <satishmlwizpro@gmail.com> - 2014-05-19 02:02 -0700
      Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Rustom Mody <rustompmody@gmail.com> - 2014-05-19 22:57 -0700
        Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Satish ML <satishmlwizpro@gmail.com> - 2014-05-20 05:21 -0700
          Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Satish ML <satishmlwizpro@gmail.com> - 2014-05-20 05:23 -0700
          Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Satish ML <satishmlwizpro@gmail.com> - 2014-05-20 05:24 -0700
            Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Satish ML <satishmlwizpro@gmail.com> - 2014-05-20 05:28 -0700
              Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. alister <alister.nospam.ware@ntlworld.com> - 2014-05-20 12:48 +0000
              Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Jagadeesh Malakannavar <mnjagadeesh@gmail.com> - 2014-05-20 21:35 +0530
                Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Rustom Mody <rustompmody@gmail.com> - 2014-05-20 18:29 -0700
                Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Satish ML <satishmlwizpro@gmail.com> - 2014-05-21 01:41 -0700
                Copying non-existing files, was Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Peter Otten <__peter__@web.de> - 2014-05-21 11:12 +0200
                Re: Copying non-existing files, was Re: Copying files from sub folders under source directories into sub folders with same names as source directory sub folders in destination directories without overwriting already existing files of same name. Satish ML <satishmlwizpro@gmail.com> - 2014-05-21 02:34 -0700
                Re: Copying non-existing files Peter Otten <__peter__@web.de> - 2014-05-21 12:15 +0200
                Re: Copying non-existing files Rustom Mody <rustompmody@gmail.com> - 2014-05-21 07:14 -0700
                Re: Copying non-existing files Chris Angelico <rosuav@gmail.com> - 2014-05-22 00:45 +1000
                Re: Copying non-existing files Rustom Mody <rustompmody@gmail.com> - 2014-05-21 22:53 -0700

csiph-web