fylat.blogg.se

Find files by date linux compress old
Find files by date linux compress old








find files by date linux compress old
  1. Find files by date linux compress old how to#
  2. Find files by date linux compress old code#
  3. Find files by date linux compress old free#

Find files by date linux compress old free#

JRV has just been critical and useless and has added no value to this thread at all, I don’t know why you are here other than to wind other people up.īill, I know this is free help but in the spirit of community that’s what we’re all here for, maybe JRV should find out a bit more about what community spirit is all about. Mike has provided me with a solution, the request was a script and mike has provided me with a script without being anĪss. I am not criticizing Mike at all on the contrary, what he has done actually works if you can be bothered to test it properly JRV. The answers provided by JRV are not helpful, if you know the answer can you just tell me and we can get on with more important things than this thread, if you don't know the answer stop replying and wasting my time. The resource senneVL looked along the right track but if it doesn't copy permissions or folder structure it obviously isn't the answer. The resource Mike gave me was good, but I cant see what parameters I need to meet the requirements of date and time

find files by date linux compress old

Off with half arsed answers (not by you Bill) I know scripting is challenging, and I really do admire the skills involved to do programming - but yet again I have come to a scripting forum because I am in need of HELP which is what this place is supposed to provide, but have instead been fobbed I am not sure if I can make the requirements any simpler, but if there is a solid answer to this, then we can at least take the next step in asking HOW? :) I need to keep the folder structure and permissions in tact. I need a mechanism to copy files using their modified date AND time. If I dumb this down to this level will it make it any easier to provide a solid answer?:

Find files by date linux compress old how to#

right now, I am still confused over what I need to use, and I still don't have a concrete answer on how to proceed. This question, it didn't appear to do what I wanted so I then thought a script would be my answer). Line to use robocopy in the way I want it to? I am already at a time limited stage, not to mention stressed due our data loss experience, and I can't find the appropriate examples to follow for what I am after (I had read about robocopy before posting I know the suggested answer to use robocopy is not a script question, fine but what's the harm in giving me the command I understand it's not a script request forum, if someone could give me the key bits of what I need im sure I can work it out from there. Secondly is it possible to go as focused as minutes or is days the best I can get with powershell?įinally, will the command you used copy the entire folder structure as it is in the source? Is the $StartDate required or can we just copy everything regardless of how old it is, we have files which are over a decade old and we don't really know what is corrupted or not, so we'd rather copy everything we have as far back as we have. SenneVL seems to have shown something that should work in powershell, however I am not as clued up in powershell as i'd like to be, can you explain the script So back to my original question, can someone help me make a script which does what I am after. it would appear that robocopy can only accept a min/max age in whole days which

find files by date linux compress old

Yes it might have to iterate through all the folders and be slower, but my original question was very specific to the date and time, those dates and times are there for a reason. VB script has the ability to use the FSObject and create folder directories in the same structure as another I am fairly sure of that. I thought I was correct the first time I posted this - a script to perform the copying. Get-ChildItem $StrSource | Where-Object | Copy-Item -Destination $StrTarget $EndDate = (get-date -year 2011 -month 6 -day 4) Or in Powershell: $StartDate = (get-date -year 2011 -month 6 -day If you persist scripting this yourself, you will have to have an handle to the source folder and loop through all files.

Find files by date linux compress old code#

Wscript.echo "Robocopy returned code " & intreturn StrCommand="robcopy.exe " & StrMySource & " " & StrMyTarget & " /S /MaxAge:5" For one, robocopy will perform significantly better than any script, secondly robocopy is certainly better tested and debugged than any of your own code. I would not recommend scripting what is already available. You can call robocopy from within a script.










Find files by date linux compress old