initial commit
This commit is contained in:
17
legacy/move_rss.py
Normal file
17
legacy/move_rss.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
# Define source and destination paths
|
||||
downloads_path = os.path.join(os.path.expanduser('~'), 'Downloads', 'rss-feed.xml')
|
||||
destination_path = '/home/zaine/Documents/projects/web-port/src/assets/rss-feed.xml'
|
||||
|
||||
# Check if the file exists in Downloads
|
||||
if os.path.exists(downloads_path):
|
||||
try:
|
||||
# Move and overwrite the file
|
||||
shutil.move(downloads_path, destination_path)
|
||||
print(f"Successfully moved and overwrote: {destination_path}")
|
||||
except Exception as e:
|
||||
print(f"Error moving file: {e}")
|
||||
else:
|
||||
print("rss.xml not found in Downloads folder.")
|
||||
Reference in New Issue
Block a user