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:
hope helps.
regards,
cataleya li
technet community support
Windows Server > Windows PowerShell
Comments
Post a Comment