mirror of
https://github.com/thisisjaymehta/python-automatic-file-organization.git
synced 2026-06-08 09:07:17 +00:00
[GH-ISSUE #1] Downloading files are moved to new folder which cause downloading to fail #1
Labels
No labels
bug
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
thisisjaymehta/python-automatic-file-organization#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@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@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
SKIPkey.Thanks for the help.