Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 批处理文件以创建目录结构_Windows_Batch File_Jenkins_Directory Structure - Fatal编程技术网

Windows 批处理文件以创建目录结构

Windows 批处理文件以创建目录结构,windows,batch-file,jenkins,directory-structure,Windows,Batch File,Jenkins,Directory Structure,我需要在Windows中创建批处理文件的帮助。我有一个作业要在Jenkins中执行,我需要创建以下目录结构: Product_4.1.1 --> this value is pass by parameter |_4.1.1.00 --> I need remove the first part (Product_) and create a new sequence |_4.1.1.01 --> I execute the job agai

我需要在Windows中创建批处理文件的帮助。我有一个作业要在Jenkins中执行,我需要创建以下目录结构:

Product_4.1.1 --> this value is pass by parameter
      |_4.1.1.00 --> I need remove the first part (Product_) and create a new sequence      
      |_4.1.1.01 --> I execute the job again, I need to create a new one directory
我用shell linux创建了这个过程,但在Windows中我没有成功


您能帮我一下吗?

即使不成功,您也应该显示批处理代码。
如果
产品中没有下划线,则应执行以下操作:

@Echo off
:: Set Arg=%~1
set Arg=Product_4.1.1
Set "Version=%Arg:*_=_%"
Echo %Arg% %Version%
Set SubVer=100
:loop
If exist "%Version%.%SubVer:~-2%" (Set /A SubVer+=1 & goto :loop)
Echo Create "%Version%.%SubVer:~-2%"
Md "%Version%.%SubVer:~-2%"

您是否选中了
md/?