'Windows10 connect network folder and find files with keyword in path
Newbie in windows command. I am trying to connect network folder in windows10 and find the most recent files(created in says past one day) with path includes specific keyword and some regex fit in files. Finally download those files to local.
Basically what I want to achieve with linux command would be like:
find ${PATH} -path "*${PATH_KEYWORD}/*/*${FILE_KEYWORD}.${FILE_EXT_KEYWORD}" -ctime -1 | xargs -i cp {} ${LOCAL_PATH}
First, I tried with Command Prompt, but seems finding the following criteria takes hours.
where /r \\network.home.com\T1\T2 "*${PATH_KEYWORD}*"
Second, I tried Git BASH, but connect to the network folder got waiting too long to proceed anything.
cd \\network.home.com\T1\T2
Any suggestion on how to best mimic the linux behavior with no performance issue will be greatly appreciated. Or maybe even some other programming language which can get job done perfectly could be considered. Thanks in advance.
Solution 1:[1]
Have you tried the DIR command? If you type "dir /?" in a command prompt, it should give you various options for directory listings. If you need to redirect the listing to a file, you could do something like "dir > somefile.txt"
You might need to experiment a bit to get the results you want.
Hope this helps. Feel free to respond back if you need me to expand on any of this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ray K. |