Recently, I already crated a script to read and rename a remote file (IP address 10.1.2.26), it is possible to read it, but is not possible to rename it , because the remote folder is protected and login is needed.
This is the code to rename the remote file:
FileName= CurrentDate.strftime("%Y%m%d%H%M%S") + “.txt”
file_oldname = os.path.join("\\HostName\Folder\\", “Results.txt”)
file_newname_newfile = os.path.join("\\HostName\Folder\", FileName)
How to build the script to log into the remote folder with the user and password?
Thanks in advance.