简体   繁体   中英

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. 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.

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.

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.

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. 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\\*.* .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM