String 如何获得DIR filename.css/b/s的搜索结果并在以下CMD命令中使用?

String 如何获得DIR filename.css/b/s的搜索结果并在以下CMD命令中使用?,string,search,cmd,get,macros,String,Search,Cmd,Get,Macros,正在尝试编写基本宏 :: go to install folder CD %USERPROFILE%\AppData\Local\Vivaldi\Application :: take a search DIR common.css /b /s 然后我得到结果 C:\Users\username\AppData\Local\Vivaldi\Application\1.13.1008.14\resources\vivaldi\style\common.css 现在我必须CD到这条没有手的路径

正在尝试编写基本宏

:: go to install folder
CD %USERPROFILE%\AppData\Local\Vivaldi\Application

:: take a search
DIR common.css /b /s
然后我得到结果

C:\Users\username\AppData\Local\Vivaldi\Application\1.13.1008.14\resources\vivaldi\style\common.css
现在我必须
CD
到这条没有手的路径=)


好的,我已经做了一些事情

:: make a filepath 
DIR %USERPROFILE%\AppData\Local\Vivaldi\Application\*common.css /s /b > %USERPROFILE%\Desktop\filepath.txt
:: placing the first line of a file into a variable
SET /P _path=<filepath.txt

只要把我的变量放在%\u path%中,它就可以工作了=0

TYPE C:\\vs\AppendThis.txt >> (paste _path here) common.css