Get filename from string-path?

前端 未结 3 1598
独厮守ぢ
独厮守ぢ 2020-12-29 02:37

How do I get the filename from this string?

\"C:\\Documents and Settings\\Usuario\\Escritorio\\hello\\test.txt\"

output:

\"         


        
3条回答
  •  一向
    一向 (楼主)
    2020-12-29 03:14

    Assuming you need the the names of files under the "c:\temp" directory tree (including sub-directories):

    FOR /R c:\temp %i in (*.*) do echo %~nxi
    

提交回复
热议问题