The current Powershell script used to archive files and subdirectories recursively to a cloud bucket is as follows:
gsutil rsync -u -r -C M:\backups gs://archive-bucket
https://cloud.google.com/storage/docs/gsutil/commands/cp
This works fine, however I need a filter to only affect files older than x minutes. Based on the documented feature (see link above) of being able to pipe in a file list, I'd like to apply the timestamp rule to generate a filtered list of all files and subdirectories under M:\backups recursively with some script represented by the placeholder "list_generator" into via -I, the standard input, provided by using cp instead of rsync, roughly like this:
list_generator | gsutil -m cp -n -r -c -I gs://archive-bucket
I presume in the above that the argument -r won't be needed as the recursive action will be relocated into the preceding routine represented by list_generator, while the -n and -c arguments need to be retained to prevent destination overwriting and provide error handling.