× 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.



Thanks John! That's what I needed!

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of jmmckee@xxxxxxxxxxxxxx
Sent: Sunday, December 09, 2007 1:32 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Copy Directories and Sub Directories - QSH

Not sure if this exists in QShell or not, but there are parameters that can
be
used with the cp command (Unix) that should do what you want.

Specifically, cp -r -p /PARENT/* /STEPPARENT

The '-r' does a recursive copy. The '-p' preserves original file access
information.

Does this exist in QShell?


John McKee

Quoting Shannon ODonnell <sodonnell@xxxxxxxxxxxxxxxxxxxxxxxxx>:

Hi,



I have a parent directory in the IFS that has several hundred
sub-directories below it. I want to copy all the sub-directories to a
different parent directory.



For example, let's say the original parent dir is: /PARENT and the new
target parent directory is named /STEPPARENT



I want all the sub directories, and the files within them, to reside in
/STEPPARENT so that /STEPPARENT will have the exact same directory
structure
and contents as /PARENT.



I can write a program to recurse through /PARENT and recreate the
directory
structure and files in /STEPPARENT (in fact, I did that first), but I want
to know if there is a QSH command that will allow me to do it all in a
single CPY. My RPG program that does this takes a really long time to do
the recursion and the recreation of the files so I'm hoping a QSHELL Copy
command would work faster.



If this was WINDOWS, I could go into Explorer and copy the files in
/PARENT
and paste them to /STEPPARENT and I'd be done. I know I can map a drive
to
do the same from the IFS, but my connection to this system is somewhat
spotty and I can't trust that the connection would stay up long enough to
finish copying all the files if I was to try it via a mapped drive.



So.I was hoping I could just submit a QSHELL command to batch to do this
for
me.



Thanks,



Shannon O'Donnell

--
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 ...

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.