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

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

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.

How to automate copying bulk pdf files from one Share point folder to another in Windows

I wonder if someone has ideas to my case.
I have a list of >200 pdf file names of documents that are saved in a share point folder and I need to copy them to another share point folder. I have looked at video clips of how to use Power Automate to copy/move files, which is very good when the file data type is used as the criteria for selecting the files. However, my list is in word and want to find a way of reading the file names, search them in the source folder and copy to the destination folder.
Any ideas?
You may consider to share the link to the 2nd SharePoint folder inside the 1st SharePoint folder to avoid copying at all?
That been said, you can load your word file into a list in Power Automate and then loop through the list (assuming your word doc has the complete path & filename line by line)
Some references:
https://learn.microsoft.com/en-us/power-automate/desktop-flows/how-to/extract-text-word-document
https://learn.microsoft.com/en-us/power-automate/desktop-flows/use-loops
The rest should be as in the video clips.

How to move things from many difference folders that have the same file name and rename them based on the folder they come from?

I'm facing a very complicated process of trying to move almost 100 files from 100 different folders with different folder names. Each folder has the file I want but they share the same file name across all 100 folders. The only thing that distinguishes them is the folder that they are in. I'm working in a terminal Linux command line system using bash so I'd need to code the transfer of these files. I could obviously do it individually but that would take ages.
The reason I want to transfer these files is I want to be able to run an analysis that involves pooling all these files into one folder from the 100 separate folders. However, if I move them they all have the same name which wouldn't work. Is there a way to rename things upon it being moved all in one go instead of individually moving things which would take ages? The key issue is since they all share the same name how do I tell which folder they originate from since that is their identifier.
In terms of what I have tried is I wanted to make a script that would iterate through the folders but the thing is I only need 100/1000 folders there. So I risk getting files from unwanted folders. Given the naming convetion of the folders are as follows
**GSE94671.T_CD5.Sp.ra (Keep)
GSE94671.T_CD5.Sp.rb (Keep)
GSE94671.T_CD5.Sp.rc (Keep)
GSE95337.ETP.Th.ra (Ignore)
GSE95853.HSPC.BM.rb (Keep)**
I couldn't come up with anyway to iteratre through them that avoids the specific folders I don't want.

What is a good way to manage the files your application creates and uses

I am trying to develop an application which has to store the paths of different folders . I thought I will create a file that stores these paths.
My problem is I don't know a proper way to manage this file like where I should save this file. I looked for information on managing files our application creates but couldn't find it. Please help me
I think you can keep file paths in a txt file as absolute path of them.
You can pick create a folder under documents or some other folder then write into your txt file.
I don't get what is so complex about it.

Relocating ".fig" files when creating a GUI using Matlab GUIDE

I've developed a GUI for some build scripts, and am now in the process of deploying it. As the script will be deployed to a number of different machines at various points, I need to use the standard format of directories that the team use.
The GUI consists of a ".fig" file that contains the visual definition of the UI, and a m-script that defines the functionality. I need to locate these two in "fig/" and "m/" folders respectively, but I can't figure out how to. I first searched for an include statement of some kind in the m-script, as when I Run it on its own, the error message in the command window states that the ".fig" file can't be found, but there doesn't seem to be a reference to the ".fig" file anywhere, I assume that it's inferred as both files have the same name but a different extension.
I fear that Matlab's GUI system requires that both ".m" and ".fig" files are in the same location, but this will be an inelegant solution that I'd rather not go for if I can avoid it.
The next thing I'm going to try is to call a script that copies the fig file from the other directory to the same location as the m-script, when it is executed, then deletes that copy once the script exits, which again seems a clunky solution, but will allow me to adhere to the team's organisation conventions.
Does anyone else know of an undocumented means of specifying the relative location of a GUI ".fig" file?
You can export the GUIDE-generated GUI as a single .m file. Check out this blog post: GUIDE GUIs in All One File.
I'm not sure if this is a new feature, or one of those things that has always been there...

Resources