Copying files from one drive to another


i need copy files folder $home\scripts (which in drive c:) usb drive, folder: f:\scripts.

i want copy files extensions csv, ps1, psm1 , txt.

f:\scripts contains many files, , don't want waste time copying files existing in folder.

only either non existing or older files in f:\scripts should copied source ($home\scripts).

right before being copied, files must processed private function called zipper (which compresses , encrypts file) , name '.bak' should added end of file fullname.

for instance:

source  ->  destination
somename.ps1  ->  somename.ps1.bak
somename.csv  ->  somename.csv.bak

does has script this?

i tried :

        copy (*) -newornewer

but did not work.

any suggestion/idea?

what asking best done robocopy.  account exisiting files , allow inclusion/exclusion extrension.  extremely fast.


¯\_(ツ)_/¯



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client