× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I saved a message to myself with the answer to this a long time ago.  I 
assume it works.  I know that I wound up writing myself a "TOUCH" OS/400 
command that does it all.

find /FolderName/SubFolder -name '*.jsp' -exec touch -acfm {} \; 

The C API "utime" does the same thing as Touch and can be protyped and 
called from RPGLE.  You would have to use other API's to do the pattern 
matching to find the files.  Looking at the command I wrote, I think I 
only did the former because the process that was going to use the command 
knew the files.

Hope this helps.

Mark

midrange-l-bounces@xxxxxxxxxxxx wrote on 05/13/2004 04:41:05 PM:

> Alright, I give.
> 
> What's the easiest programmatic way to touch a file in the IFS?  I
> wanted to do "touch *.jsp" in a folder, and I get the dreaded "too many
> arguments" error, because there are too many files in the folder (don't
> get me started on how stupid this is).
> 
> So, now I'd like some suggestions on the simplest way to:
> 
> 1. Touch a single file
> 2. Specify a folder and touch every JSP in that folder and all its
> subfolders.
> 
> A straightforward multi-step process using temporary files and standard
> shell commands is an acceptable possibility.  Simple code for doing it
> from RPG is also fine.
> 
> Last place option is a Java program.
> 
> Joe
> 
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing 
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.