Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

get the creating date of files ftp python

connection = ftplib.FTP(**ftpCredentials)
modifiedTime = connection.sendcmd('MDTM ' + fileName)
# successful response: '213 20120222090254'
Comment

get the creating date of files ftp python

from datetime import datetime

print datetime.strptime(modifiedTime[4:], "%Y%m%d%H%M%S").strftime("%d %B %Y %H:%M:%S")
# prints something like 01 January 1970 09:30:01
Comment

PREVIOUS NEXT
Code Example
Python :: how to wait for loading icon to disappear from the page using selenium python 
Python :: opposite case in python 
Python :: pandas assign value to row based on condition 
Python :: python append to a exiting csv file 
Python :: how to iterate through a pandas dataframe 
Python :: python string lower method 
Python :: iterate rows and columns dataframe 
Python :: spacy import doc 
Python :: pip ne marche pas 
Python :: change index function for class python 
Python :: how to create image folder in numpy aray 
Python :: instance variable python 
Python :: how to get index in python 
Python :: migrate database in django 
Python :: python comment header 
Python :: pandas find column with max value for each row 
Python :: decimal hour to hour minute python 
Python :: Sorting a list using a named function 
Python :: python utf upper() 
Python :: tuple methods in python 
Python :: numpy variance 
Python :: remove days when subtracting time python 
Python :: tri fusion python code 
Python :: change edit last line python 
Python :: extract specific key values from nested dictionary 
Python :: validating credit card numbers 
Python :: re sub python 
Python :: pydub audiosegment to numpy array 
Python :: python get dir from path 
Python :: threading in python 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =