Hi,

Thanks for the responses!

Sean,
I think we will try this, I'm sure it will work for us.

Rob,
We were actually considering doing it manually with a mapped Windows drive, although the first time would be huge!

Scott,
Your comment about creation date v last modified makes a lot of sense. I will discuss that with the business owners of the files. We may be OK with creation date though as we are just going to move them to a different directory (to exclude from the backup), not delete them.

Thanks

Adam Driver
QUINNOX | Accelerate Success
Phone: +1 847 916 9499
Mobile: +1 608 772 8538
www.quinnox.com<https://mum.quinnox.com/owa/redir.aspx?C=NuhnoTp8tEyRbwp2TF_3yKV40zWgAtAIivQjaXeAVts_w585Ftn51P9-03yfGmsd5TQnHgG2MfQ.&URL=https%3a%2f%2fqmail.quinnox.com%2fowa%2fUrlBlockedError.aspx>


subject: Re: Move IFS files based on date



Ok, you're running this once a month.

What is this worth to you to automate it?

For example, you could go into iNav. Sort the contents of the 'from'

directory by any choice of 'create date', 'change date', etc. Select the

dates you want, highlight those rows and move the suckers.



Or, you could read Scott Klement's IFS APIs and read the directory, save

the object, move the object, next.

Could even take it to an extreme and as part of the move, add it to a zip,

jar or some related file.





Rob Berendt

--

IBM Certified System Administrator - IBM i 6.1

Group Dekko

Dept 1600

Mail to: 2505 Dekko Drive

Garrett, IN 46738

Ship to: Dock 108

6928N 400E

Kendallville, IN 46755

http://www.dekko.com





from: "Porterfield, Sean" <SPorterfield@xxxxxxxx<mailto:SPorterfield@xxxxxxxx>>

subject: RE: Move IFS files based on date



As an example response, I have the following in a shell script that is on the job scheduler to be run through QP2SHELL:



find /tmp/sq* -mtime +21 -exec rm {} \;



That deletes /tmp/sq* if it's older than 21 days. You could use mv instead of rm to move it somewhere else. You could probably do something clever with date calculations if you need to match a month specifically rather than "older than x days"



Command : CALL PGM(QP2SHELL) PARM('/QOpenSys/usr/bin/sh' 'myscript.sh')



Other methods I tried failed due to the number of files found.

--

Sean Porterfield





from: Scott Klement <midrange-l@xxxxxxxxxxxxxxxx<mailto:midrange-l@xxxxxxxxxxxxxxxx>>

subject: Re: Move IFS files based on date





I don't know an easy way to do this based on creation date, but if

you're willing to use the last modified/changed date, then it should be

pretty easy to do with QShell.



Actually, I wonder if the last modified date wouldn't be a better idea,

anyway -- you'd want to back it up if it has been modified, wouldn't

you? Unless things are never modified after they are created -- in

which case, it wouldn't matter which date you used, they'd always be the

same, right?




________________________________

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute, print or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. Any views or opinions presented in this email are solely those of the author and do not necessarily represent the views of the company. Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.