windows - Script to copy collection of folders into subfolders seperated in parts -


i have collection of files sizing 33+gb ,

there 415 folders of these files.

cd0001 cd0002 cd0003 cd0004 cd0005 cd0006 etc, etc... 

these updated files/folders program gets new updates every quarter, , been racking can tell.

we have them seperated in parts 1-27 , divide them in 800-1,5gb parts. (started 1gb per part)

what hoping can me create script can run, copy cd* folders, respective parts folder, without me having go folder every time , check there.

ie.

see folder c:\temp\updates\cd0001   looks cd0001 in parts folders (example \\\server1\program\part*\\*)   removes old cd* folder.   copies in new cd* folder. 

when started parts, there gaps inbetween cd's, in there cd0001-cd0255 , cd0330-cd0880, etc.

and few quarters later, release cd0280, cd0281, cd0282, etc , big.

so needed make part28 , continuance gets broken... :)

its svn system aswell, cant move cd's part2 part3.

any appreciated!

if else stumbles upon this,

made quick 1 have made list better, but...

$source = "<sourcepath>"  $part01 = "destination_part01" $part02 = "destination_part02" $part03 = "destination_part03" $part04 = "destination_part04" $part05 = "destination_part05" $part06 = "destination_part06" $part07 = "destination_part07" $part08 = "destination_part08" $part09 = "destination_part09" $part10 = "destination_part10" $part11 = "destination_part11" $part12 = "destination_part12" $part13 = "destination_part13" $part14 = "destination_part14" $part15 = "destination_part15" $part16 = "destination_part16" $part17 = "destination_part17" $part18 = "destination_part18" $part19 = "destination_part19" $part20 = "destination_part20" $part21 = "destination_part21" $part22 = "destination_part22" $part23 = "destination_part23" $part24 = "destination_part24" $part25 = "destination_part25" $part26 = "destination_part26" $part27 = "destination_part27"  $partlist ($part01,$part02,$part03,$part04,$part05,$part06,$part07,$part08,$part09,$part10,$part11,$part12,$part13,$part14,$part15,$part16,$part17,$part18,$part19,$part20,$part21,$part22,$part23,$part24,$part25,$part26,$part27)  foreach ($item in $partlist) { $cdlist = get-childitem -directory -name $item $partpath = $item foreach ($item in $cdlist) {     if (test-path "$partpath\$item") {         if (test-path "$source\$item") {             write-host "replace true"             write-host "copying $source\$item $partpath\$item"             robocopy "$source\$item" "$partpath\$item" /e /purge /np /tee /fft /r:1 /w:1 /log:"c:\temp\logs\$item.log"             write-host "$source\$item processed"             move-item -path "$source\$item" "$source\processed"             }         }     } } 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -