Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

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

$
0
0

while copying the files, it has to check with current date and it has to create a folder and copy the files into that.
- Now if the old files are exsisting in the present folder you have to move them to another folder called History folder(Old files) by creating an individual folders with the date(like 01,02,03,04....30) as folder name. eg. Copied a file yesterday in a folder called Present and again you are copying a fresh file today into the present folder again. So here the yesterday file has to be moved to other folder called history by creating it self a folder with the yesterdays date as name of the folder and move the file into that folder.

- There are some naming conventions to the files and according to them we have to move to respected folders.
- If we have a single file with similar name then that has to copy to both sides(Into Present and History folders).

Can anyone please help me on this as I am not well in powershell scripting.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>