YashsharmaPhD commited on
Commit
8bf875f
·
verified ·
1 Parent(s): 8197a72

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from ftplib import FTP
2
+
3
+ host = "cph.v4one.co.uk"
4
+ username = "yash.sharma"
5
+ password = "8x]EnG/Z%DXvcjt[%<;S"
6
+
7
+ try:
8
+ # Connect to the FTP server
9
+ ftp = FTP(host)
10
+ ftp.login(user=username, passwd=password)
11
+
12
+ # List files in the root directory
13
+ ftp.retrlines('LIST')
14
+
15
+ # Close the connection
16
+ ftp.quit()
17
+
18
+ except Exception as e:
19
+ print("Error:", e)