Moving files based on file-name to designated folder with same name

0 votes
Hi everyone,

I am working on a AWS python lambda script using boto3. The problem is that I need to have a file based on its named be moved into folders also based on their name. It's not hard-coded into the script and that the files will increment alphabetically.

For example: a file named my_file_a will be moved into a folder called my_file_a, then, my_file_b1 will be moved into a folder called my_file_b1 and so fourth.

The script is suppose to read the filename first, then, based upon this, move it into a folder with the same name. If it does not exist then it skips to the next file-name and attempts to move that file to its folder.
Jun 9, 2021 in Cloud Computing by anonymous

edited Mar 4, 2025 294 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP