In order to not impact your SEO, you would need to use a 301 redirect to let search engines know that the pages have permanently moved to the new directory (see the link for more).
Confirmed with a contact at Yahoo Small Business Hosting: You would need to use their Page Redirect Manager tool to setup 301 redirect rules as covered here.
Unfortunately, as with URL rewriting using Apache or other webserver, you can't do this programmatically for all URLs using a regex, you would need to set redirect rules for each URL.
Since many redirects would be needed however, you can upload your redirect rules as a list in a CSV file, as covered here. Using a spreadsheet, you could just do a find/replace to modify your list of old URLs to change them to the new URLs. You can also change the file extension in addition to the directory.
Of special note covered here however, you need to remove all the files at the old location:
When creating and editing redirects in Page Redirect Manager, existing
site pages may not be redirected while they still exist on your site —
the page at the URL you wish to redirect must be deleted first.
You would also need to update any internal links that point to the old directory in your URLs so that they're not broken, and continue to pass authority. Using the example from the question, search your site and change:
Also, try to contact each external site that links to the old URLs to request that they change them to the new URLs.