[英]Jenkins Windows | Build > Execute Windows Batch Command | How to move folder and files into the Root Directory / Workspace
I could really need some help right now.我现在真的需要一些帮助。
I want to move files (with subfolders and files in it) into the root / workspace of my current jenkins App.我想将文件(其中包含子文件夹和文件)移动到我当前 jenkins 应用程序的根目录/工作区中。 My other batch commands work, for example:
我的其他批处理命令有效,例如:
move app laravel
moves the app folder and its content into the laravel folder And i think it works without a problem because I can call the absolute folder. move app laravel
将 app 文件夹及其内容移动到 laravel 文件夹中 我认为它可以正常工作,因为我可以调用绝对文件夹。
but if I want to move my files "dynamically" using an relative path (move to root): move public/.htaccess ./
it throws an error that it coudn't find the path.但是如果我想使用相对路径“动态”移动我的文件(移动到根):
move public/.htaccess ./
它会抛出一个错误,它找不到路径。
I also tried the following synonyms for the root directory, but none worked:我还为根目录尝试了以下同义词,但都没有奏效:
..
, $WORKSPACE
, %WORKSPACE%
, ws
, workspace
, /workspace/<appname>
, <appname>
or /
.. or \\
im just out of ideas by now. ..
、 $WORKSPACE
、 %WORKSPACE%
、 ws
、 workspace
、 /workspace/<appname>
、 <appname>
或/
.. 或\\
我现在只是没有想法。
Any recommendations?有什么建议吗?
Okay, I solved it...好的,我解决了...
I researched the folder structure and found that one of my earlier trys kinda worked.我研究了文件夹结构,发现我之前的一个尝试有点奏效。 It moved files into the Jenkins/workspace folder.
它将文件移动到 Jenkins/workspace 文件夹中。 That wasnt planned but because of that I now knew that some command must have worked!
那不是计划中的,但正因如此,我现在知道某些命令一定起作用了!
The command that worked was ..
as the destination directory, because it is in the root directory.有效的命令是
..
作为目标目录,因为它位于根目录中。
So my Solution now was simple:所以我现在的解决方案很简单:
move public\\*.* .
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.