I am looking for script which can copy files from one location to another location with different conditions.


while copying the files, has check current date , has create folder , copy files that.
- if old files exsisting in the present folder have move them folder called history folder(old files) creating individual folders date(like 01,02,03,04....30) folder name. eg. copied file yesterday in folder called present , again copying fresh file today present folder again. here yesterday file has moved other folder called history creating self folder yesterdays date name of folder and move file folder.

- there naming conventions files , according them have move respected folders.
- if have single file similar name has copy both sides(into present , history folders).

can please me on not in powershell scripting.

hi,

single powershell command copy & rename files:

if have csv containing 2 columns: oldfilepath , newfilename, can use following.

import-csv c:\test.csv | % { copy-item -path $_.oldfilepath -destination "c:\test\$($_.newfilename)" } 


please go through below article:

http://blogs.technet.com/b/heyscriptingguy/archive/2013/04/19/use-powershell-to-copy-files-and-folders-to-a-new-location.aspx

hope helps.

regards,

yan li


cataleya li
technet community support



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607