18 lines
606 B
Python
18 lines
606 B
Python
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.")
|