Writing a script to copy a folder and contents based on the length of an array?

时间:2016-02-12 20:40:52

标签: javascript node.js bash copy directory

I know almost nothing about bash but I know this is a fast way to do this. My psudo code is in JS. But any language will do e.g. node, python, bash.

step 1: I have an array:

doStepA() calculateETA(point1, destination: point2) { (eta: Int) -> Void in doStepB() etaBetween1n2 = eta doStepC() } } func doStepA() { print("A") } func doStepB() { print("B") } func doStepC() { print("C") }

step 2: I have a folder.

enter image description here

Question:

How would I copy this folder based on the var langArr = ["af","am"]; (2) times; Place those new copied folders 'languages' directory; name those directories from the langArr.length index values?

In the end we'll have 1 parent folder and 3 children

langArr

1 个答案:

答案 0 :(得分:0)

you can try this...

<div id="c1">
  <img src="http://lorempixel.com/output/technics-q-c-200-200-4.jpg" />
</div>
<div id="c2">
  <div class="pointy">
    <div class="curve-left"></div>
    <div class="curve-right"></div>
  </div>
  <img src="http://lorempixel.com/output/technics-q-c-200-200-1.jpg" />
</div>