Hi Simon, I finally learned enough Python to write the programs.It turned out to be more complicated than I originallythought (that's never happened before) and I endedup writing one program to identify folders to copy based on the presence of keywords in the path thena second program to actually copy each folder and allof its subdirectories. I also added logic to stop thecopy after a certain amount of data was copied withthe ability to pick up where it left off on another run(there are 8 TB of data...
Simon, Thanks for the explanation. Richard On Tuesday, December 10, 2019, 11:07:37 AM PST, Simon Booth <mrsdbooth@users.sourceforge.net> wrote: Hah, yes sorry that is an obscure bit of code, and very 'Python'. It breaks down to something like: any(...) ... is the list formed by this expression non-empty [word in folder] ... true if the string 'folder' contains the string 'word' ... [for word in keywords] ... where we will use the name 'word' to refer to every item in the list 'keywords' It's basically...
Simon, Thank you for the update. I'm still trying to understand some of the commands inthe original script so this helps a lot. If you don't mind, how does this statementrun: if any(word in folder for word in keywords): I don't see word or folder defined or used beforethis and they aren't reserved words. Am I supposedto substitute them for something? Richard On Monday, December 9, 2019, 3:08:33 PM PST, Simon Booth <mrsdbooth@users.sourceforge.net> wrote: I've updated the Python script to handle directories...
Simon, Wow. Thank you VERY much. I was starting toteach myself Python so I could write the programmyself but it takes more time than I really have sothis is a huge help. Not to look a gift horse in the mouth or seem ungrateful, but could I ask for a couple of what I hope are simple enhancements? First, I need to preserve the original timestampsin the copied data. I was going to use a call torobocopy with the options /COPY:DAT and /DCOPY:T.Is there an equivalent in python? Second, this project is...
Simon, Would you be interested in a quick contract to write such a script? (I don't know Python and don't have time on this project to learn it on the job.). Basically I would need to treewalk a directory structure for folders with names that contain one of a list of keywords (as a substring or a whole word if the folder name contains whitespace). If such a folder is found its entire contents would need to be copied to another drive preserving timestamps and the entire directory structure from the...
Hi, I need to identify folders on an 8 TB drive where the folder name contains one of a list of keywords then copy that folder's entire contents to another drive. There are 8.5 million files and folders on the drive so I need to be able to do this in a batch mode. Can SmartCopyTool do this?