[GH-ISSUE #1] Downloading files are moved to new folder which cause downloading to fail #1

Closed
opened 2026-06-06 12:07:35 +00:00 by thisisjaymehta · 2 comments

Originally created by @thisisjaymehta on GitHub (Jun 2, 2020).
Original GitHub issue: https://github.com/thisisjaymehta/python-automatic-file-organization/issues/1

Originally assigned to: @thisisjaymehta on GitHub.

The code moves new files as soon as they are created.
This creates an issue when a browser is downloading a file to that folder, script will move the file as soon as download starts and so in browser download will fail.
Need a mechanism to check if file is currently in use by some other process before moving.

Originally created by @thisisjaymehta on GitHub (Jun 2, 2020). Original GitHub issue: https://github.com/thisisjaymehta/python-automatic-file-organization/issues/1 Originally assigned to: @thisisjaymehta on GitHub. The code moves new files as soon as they are created. This creates an issue when a browser is downloading a file to that folder, script will move the file as soon as download starts and so in browser download will fail. Need a mechanism to check if file is currently in use by some other process before moving.
Author
Owner

@khushit-shah commented on GitHub (Aug 14, 2020):

get the last modified time of the file. If the file was not modified for a certain amount of time(i.e. minute) organize it.
checkout os.stat(FILE_PATH).st_mtime

<!-- gh-comment-id:673781837 --> @khushit-shah commented on GitHub (Aug 14, 2020): get the last modified time of the file. If the file was not modified for a certain amount of time(i.e. minute) organize it. checkout `os.stat(FILE_PATH).st_mtime`
Author
Owner

@thisisjaymehta commented on GitHub (Aug 16, 2020):

Found another way where you can add extensions that you want to skip, to the extension list under SKIP key.
Thanks for the help.

<!-- gh-comment-id:674496322 --> @thisisjaymehta commented on GitHub (Aug 16, 2020): Found another way where you can add extensions that you want to skip, to the extension list under `SKIP` key. Thanks for the help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thisisjaymehta/python-automatic-file-organization#1
No description provided.