shutil.copy("uploads/Image.image.a278723.jpg", "uploads/
advertisement.jpg")

I need the correct path, is it the whole path /home/cesar/web2py/
applications/bluetooth/uploads/image1.jpg

i tried different ways but im still getting that error.

On 11 nov, 17:36, CesarBustios <[email protected]> wrote:
> I have like 20 images in the uploads directory, they are all
> advertising images, if i want to send, say image1 first, i need to
> make a copy in the same directory with the name "advertisement", if i
> need to send imag16 i have to do the same thing and rename it to
> "advertisement". Im sending via bluetooth i just want to rename the
> images.
>
> On 11 nov, 17:25, mdipierro <[email protected]> wrote:
>
>
>
> > You call:
>
> > shutil.copy(path, destination)
>
> > if path and destination are the same value there is nothing to copy.
>
> > shutil.copy(path, destination)
>
> > path and destination must be different filenames.
>
> > On Nov 11, 4:12 pm, CesarBustios <[email protected]> wrote:
>
> > > path and destination are in fact the same directory (uploads) i'm just
> > > trying to make a copy.
>
> > > Thanks
>
> > > On 11 nov, 11:12, mdipierro <[email protected]> wrote:
>
> > > > what are path and destination?
>
> > > > On Nov 11, 9:20 am, CesarBustios <[email protected]> wrote:
>
> > > > > I'm using the whole path, i'm trying everything but i can't copy the
> > > > > file. Any thoughts?
>
> > > > > On 10 nov, 20:18, CesarBustios <[email protected]> wrote:
>
> > > > > > Hi, i'm trying to make a copy of an image inside my "uploads" 
> > > > > > folder. I
> > > > > > ´m using the shutil module:
>
> > > > > > import shutil
> > > > > > shutil.copy(path, destination)
>
> > > > > > But i get "No such file or directory" error. Can anyone tell me the
> > > > > > correct path if my project is inside: 
> > > > > > /home/user/web2py/applications/
> > > > > > myproject/uploads/File.file.asdad89018239.128320.jpg
>
> > > > > > Thanks!- Ocultar texto de la cita -
>
> > > > - Mostrar texto de la cita -- Ocultar texto de la cita -
>
> > - Mostrar texto de la cita -- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Reply via email to