1

I have a NAS which having below file structures:

Say I have a movie directory "Terminator" which stores in below directory:

/media_staging/Terminator

    From Destination: /media_staging/Terminator
    To Destination:   /video/
    
    *Note: media_staging & video are in the same file level

So how could I use the ftp.rename to move the 'Terminator' file from under media_staging to video?

Can I do it with something like this:

ftp.rename('/media_staging/Terminator','/video/Terminator')

As I could see it says there is permission issue in here...

May I know which is the right way?

furas
  • 134,197
  • 12
  • 106
  • 148
Woody
  • 125
  • 1
  • 11
  • 1
    Does this answer your question? [How to move files using FTP commands](https://stackoverflow.com/questions/9461844/how-to-move-files-using-ftp-commands) – Leo Jul 24 '21 at 17:15
  • 1
    I don't see `"permission issue"` in your question. Maybe you have to privilegets to access some folders. Maybe you will have to move files one by one. – furas Jul 24 '21 at 19:09
  • Really?? Cannot move the whole directory by using 1 line code?? – Woody Jul 25 '21 at 01:51
  • After I rechecked my code, now it prompt "550 rename: Invalid cross-device link.".... – Woody Jul 25 '21 at 02:00

1 Answers1

1

After few tries, found that the reason why have such error is that the file 'Media_staging' & 'video' are in different share folders which is unable to move files, if in the same share folder, the ftp.rename & ftp commands can be executed fine.

Woody
  • 125
  • 1
  • 11