import frappe

def execute():
	frappe.db.sql('''
		UPDATE tabFile
		SET folder = 'Home/Attachments'
		WHERE ifnull(attached_to_doctype, '') != ''
	''')

import frappe

def execute():
	frappe.db.sql('''
		UPDATE tabFile
		SET folder = 'Home/Attachments'
		WHERE ifnull(attached_to_doctype, '') != ''
		AND folder = 'Home'
	''')

Move files only from Home folder
fix(patch): Move files only from Home folder