Warn user for creating file with same filename in same directory but also include sub directories - firefox

I'm looking for a solution that checks for the same filename when I'm downloading files, specifically through Firefox on Windows 10. I know that this feature comes standard when it comes to files in the same directory, but as the volume of files scales up, it's getting harder and harder to find what I'm looking for out of the files I've downloaded.
But since Firefox doesn't have an option to scan sub directories when saving files (nor can I find an add-on for Firefox that does something like it), I'm looking for any alternative solutions that would achieve what I'm looking for in the end: something that will notify me that I'm attempting to download (or have just downloaded) a file whose name already exists in the sub directory of a given folder, whether that be via an add-on, or some kind of application or script that can run in the background. Preferably, I would like it to check the folders inside of those sub folders as well.
My memory is terrible, so I opted to keep everything in the same folder so I would immediately get the warning when attempting to download a file I'd already downloaded. But said folder now contains far too many files for me to realistically glean through to find a particular file that I'm looking for.
I would like to be able to sort these files into sub folders of the folder I'm currently storing my downloaded files while keeping the functionality of being able to immediately tell whether or not I'm about to download something I've already downloaded. All I need is a check to see if the same filename exists upon trying to create a file (which is already a feature) - but in the sub directories as well. I do not need any functionality to actually view all the files in each sub folder in the same window.

Related

Is there any way to filter folders/directories by name in windows?

Is there any way to filter folders by Name in Windows?
Let's suppose I have 100 or 200 folders with different names in the directory.
Now I have a list of specific folder names that are in the folders and I want to filter/move those listed name folders to another directory.
In an easy word I want to copy/move listed folder names to another folder/directory.
How can I do that with any software in bulk? I am searching for it but I can't find any software to do this task for me. I can manually move the folder one by one but it's so time-consuming when I have hundreds of folders.
I am currently using XCOPY GUI software but in this software, I have to first filter the path exception folder before I get my final result.
Example:
Main Dir contains
1st folder
2nd folder
3rd folder
4th folder
and so on ...
I have a list of names in my notepad which folders I want to copy or move.
3rd folder,
4th folder
Final Dir:
3rd folder
4th folder
How can I do that in bilk using any software or any way?
Thanks
If you're using Java, you can use methods in the Files class, or instances of File.
For example, Files.move() might help. If you're using an IDE, type stuff that might be right, like Files.move(), and suggestions will pop up that might lead you down the right path. Also, you can look at the documentation. I am currently scraping the web and creating and filing files, so I know about this somewhat, although not specifically about moving folders rather than files. I'm using Java on a MacBook, so that might influence how relevant my suggestions are to you depending on what you're using.
Basically, look at the documentation for your language. You hopefully won't need any external libraries since moving folders should be a basic task.

Is there a way to have multiple files with same backing data in macOS FileProvider extension?

I'm creating a macOS FileProviderExtension for the remote Document Storage System (kind of like GoogleDrive), where it is possible to share a single document with multiple folders.
For example, Document1.pdf can simultaneously exist in Folder A and Folder B because it's shared with both folders. In my FileProvider extension, this would mean that file should be accessible in both folders:
Folder A/Document1.pdf
Folder B/Document1.pdf
But the file provider extension will treat those as two completely separate files. I.e., if you download one of them, and then try to open the other one, it will redownload the other one, effectively doubling the used space on user's disk and consuming network connection.
I'm looking for a way to tell the FileProviderItem what is the backing data for the given file, and thus solve problems such as:
If user downloads a file in one location, ideally I would tell the FileProvider extension that the same document in all the other locations is also now downloaded (cloud icon should disappear from all files).
Some approaches I considered:
I thought of using symbolic links as part of solution, but I don't really think that's possible
When user tries to open non-downloaded file, fetchContents(for itemIdentifier) callback is invoked. Once file is downloaded, I would ideally now notify all the other files of the same document that they are downloaded, i.e. by updating the isDownloaded property in NSFileProviderItem, but that doesn't seem to work. Also, even if I do that, I still can't say to file, what his backing data file should be.
By turning off the Sandbox capability, I guess I could, when user tries to download/open the file which has already been downloaded in other location, immediately report that file has been downloaded and provide the copy of already downloaded file as data for the requested file, but there are two drawbacks here:
3.1. I would have to turn off the Sandbox capability because I want to access the file in FileProvider path directly
3.2 System would still use disk space for each file. So, if I have same document in multiple folders, extension would keep all those copies in the system, without the option to tell it that for all those files, there is same backing data file somewhere in extension's Container.

How can I mirror deleted duplicates from a source into a destination?

Here's the scenario: We have a computer running Windows 10 which has a directory that's backed up nightly. The backups are done with a batch file utilizing Robocopy and scheduled via Windows. The parameters are as such that the backup will always add any new files or existing file edits into the destination, but it will never delete files from the destination that have been deleted in the source. It essentially archives all files which are in the source directory at the end of each day.
Here's the tricky part. The source directory is very large, and occasionally someone finds a duplicate file (or several duplicates of a file) in it. When that happens, we need to delete all but one copy of the file, and then we need to access the backup directory manually, locate the file there, and do the same. This is tedious and time-consuming as it's not rare for someone to notice an entire subdirectory full of files that exist 5+ times each.
What we're looking for is a way to scan the source directory and all subdirectories inside for duplicate files and remove all but one copy of them, and then a way to reflect that into the destination. I've assumed that we will not be able to use Robocopy to reflect the changes in the destination due to the nature of the backup script it's running, but we do have the ability to run any third-party software on the destination directory as well, essentially running an action in both directories to clean each of them of duplicate files.
On that note, I'm not against using third-party tools to make this cleaner or more efficient, I'm just not aware of any.
There is one way to solve this problem I was also suffering from this problem. but I found that how to use "BATCH" file
There are mainly 2 command
X_COPY
ROBO_COPY
According to your need here, (1)x_copy will be helpfull
xcopywill backup your specific file or folder even if you changed some megabytes data, it will copy the new data and will not be replaced on previous data it will make new copy.
HOW TO DO
Open NotePad and type
xcopy "source file" "destination" /y/e/d/c/f/h/i/z/j
And then save your notepad as ".bat" file
for more requirement use below url
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy

Windows - Virtually consolidating files from several directories into a single path

I have been searching for this for a while but no success yet. Not sure if I'm using the right terms...
I'm trying to programmatically automatize the use of an API (from a software called Pix4D) to which I need to pass a directory path as one of the parameters. This directory is supposed to contain all files that will be processed by the aforementioned API.
The problem is that the API only accepts a single path, while my business process will always organise the input files into several input folders (I tried, but I cannot change this).
I'm trying to find a way to create an extra folder that would contain some sort of reference to all the files organised in those input folders. Thus, when one opens that "virtual folder" path, he would see all files together. This would potentially allow me to use the path for the new folder as the input for the API.
So, suppose I have these files I want the API to process:
C:\proc\20170101\f1.jpg
C:\proc\20170101\f2.jpg
C:\proc\20170201\f1.jpg
C:\proc\20170201\f2.jpg
C:\proc\20170301\f1.jpg
C:\proc\20170301\f2.jpg
I would need a single path to a directory that virtually contains all those 6 jpg files.
Some constraints:
We don't want to duplicate files
The virtual path needs to be created via command line
It should work on a Windows machine
Yes, there might be files with same names in the input folders. We can work around this, if necessary
Open source/free solutions would be better
Any help is highly appreciated. Same goes to any different approach to the problem.
Thanks

Packaging: Ruby and shoes writing and reading txt files

I'm new to ruby ... and shoes... and programming but here is my prob:
I made a timer which puts the timed amount into a txt file as a log. It also keeps an all time running total in a separate txt file. It works as I want it to...
I tried packaging it:
If I package the rb file it doesn't work, it will only work if I package the entire folder including the txt files.
This working copy seems to operate without txt files (they are somehow built-in. Is there a way to package this so I still have access to the associated txt files. (maybe has something to do with the paths...)
thanks.
Shoes Packager behaviour is sometimes ugly. I think you're using windows, so i'll try to explain what seems to happen:
You have a bundled Shoes-App (a standalone .exe file). Every Time you start it by double clicking, it will extract itself in a new temp dir (located under c:\tmp\tempFileDirectory). So, it is a NEW temporary Directory, everytime!
The current path also is set to this tmp directory, which also includes the txt files you bundled into the app, in it's original state. If you change the content of the files during the app execution, and restart the app, your changes are gone, because in the new created tmp dir, there is a fresh copy of the original txt files. so far, it is a BAD idea to put your data files (txt in your case, or SQLITE-database-files, or config files, ...) into the bundles app.
Better way:
create a "hidden" folder (folder's name should start with an ".") in the user's home folder. On windows it should be something like "c:\Users\YourName". Create there everything you need, this directory won't be temporal, so you can access it everytime without problems. This should general be a better solution when programming desktop stuff, not just while using shoes.

Resources