How should I make it so that the file I download from ftp is recorded in a specific directory, and not where the artist file is stored?
import ftplib host = "*" ftp_user = "*" ftp_password = "*" filename = "picture.png" con = ftplib.FTP(host, ftp_user, ftp_password) lf = open(filename, "wb") con.retrbinary("RETR " + filename, lf.write) lf.close() saving the file to another folder is wrong C:\Users\\Desktop\try\d and /d
filenamevariable, something likefilename = "dir/nextdir/picture.png"so the file is saved to thedir/nextdir/directory - Igor Igoryanych