【发布时间】:2013-11-29 01:17:33
【问题描述】:
我正在编写一个由 Java 程序调用的 Windows 批处理文件。许多表示文件目录的不同字符串作为参数传递到批处理文件中。我试图弄清楚如何在“\”的最后一个实例之后提取字符串。比如我有三个目录:
C:\Users\owner\Documents
C:\Users\owner\Videos
C:\Users\owner\Pictures\Trip
我想把它拆分成字符串变成:
Documents
Videos
Trip
你们建议我怎么做?
编辑:这里提出了一个后续问题:For loop in Windows batch file: Error: "The syntax of the command is incorrect"
【问题讨论】:
标签: string batch-file split delimiter