fhg
Volume 8, Number 4 -- January 30, 2008

Create Multiple Directory Levels in One Swell Foop

Published: January 30, 2008

Hey, Professional:

Yes, you, the person who knows so much about making machinery serve your organization. You, the person who knows so many little, seemingly trivial and insignificant bits and pieces of information. Here's a bit of info that maybe no one in your shop knows, and it can come in handy. It comes from the IT Jungle Web forums.

Here's the original question, after a bit of editing.

During a payroll run, I need to create multiple directories (which will be subdirectories) that will contain various reports, for specific companies, for specific pay dates. The company directories already exist. For example:

/reports/01
/reports/02
/reports/03

I need to create a process to create a subdirectory for the pay period. For example:

/reports/01/042106
/reports/02/042106
/reports/03/042106

Can anyone offer me some insight into the best way to approach this task?


"Russ K" (a really sharp consultant from New Jersey) and I tried to help this person. I'm not sure if we succeeded, but in the process we discovered something else: the OS/400 directory creation commands (CRTDIR, MKDIR, and MD) don't support the creation of more than one level of directory at a time.

While researching another problem, I discovered that Qshell's MKDIR command has a "-p flag" that allows you to create more than one level of directory at once. For example, the following command will create as many as five levels of directory.

mkdir -p /home/tholt/reports/2007/12

If you'd like to read the entire thread, click on this link.

If you'd like to participate in the Web forums, but are having trouble getting your account activated, please email me through the Contacts link at the top of this page. Be sure to use an appropriate subject line so I won't confuse your email for spam.

--Ted




                     Post this story to del.icio.us
               Post this story to Digg
    Post this story to Slashdot


Sponsored By
GUILD COMPANIES

Getting Started with PHP for i5/OS
Available NOW from the IT Jungle Bookstore

Author Brian Kelly takes you through the most efficient ways to use this popular Web scripting language. This new book covers everything you will need to start implementing dynamic Web applications with PHP.

Getting Started with PHP for i5/OS is more than a developer's manual for PHP programming, it is also an installation guide. Learn PHP, MySQL, DB2, and RPG, get introduced to content management systems such as Mambo, Joomla, and Drupal, plus a step-by-step map of how to install a CMS on your System i.

Price: $59.95
Get Your Copy at the IT Jungle Bookstore Today!


Senior Technical Editor: Ted Holt
Technical Editors: Howard Arner, Joe Hertvik, Shannon O'Donnell, Kevin Vandever
Contributing Technical Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Brian Kelly, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

COMMON:  Join us at the annual 2008 conference, March 30 - April 3, in Nashville, Tennessee
BCD:  WebSmart offers you more Web Application Development choices
Vision Solutions:  Enter to win an iPod Touch. Just download any of our DR planning resources


 

IT Jungle Store Top Book Picks

Getting Started with PHP for i5/OS: List Price, $59.95
The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
The System i Pocket RPG & RPG IV Guide: List Price, $69.95
The iSeries Pocket Database Guide: List Price, $59.00
The iSeries Pocket Developers' Guide: List Price, $59.00
The iSeries Pocket SQL Guide: List Price, $59.00
The iSeries Pocket Query Guide: List Price, $49.00
The iSeries Pocket WebFacing Primer: List Price, $39.00
Migrating to WebSphere Express for iSeries: List Price, $49.00
iSeries Express Web Implementer's Guide: List Price, $59.00
Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
Getting Started with WebSphere Express for iSeries: List Price, $49.00
WebFacing Application Design and Development Guide: List Price, $55.00
Can the AS/400 Survive IBM?: List Price, $49.00
The All-Everything Machine: List Price, $29.95
Chip Wars: List Price, $29.95


 
The Four Hundred
IBM to Buy AMD? Seems Unlikely, But an Interesting Idea

i5/OS V6R1: It Must Be Getting Close, Since People Are Talking

Microsoft Rains on IBM's Lotusphere Parade

As I See It: Avatar Nation

Readers Pipe Up On the STG Reorg and System i Wish List

The Linux Beacon
openSUSE Build Service Pumps Out Red Hat, CentOS Packages

IBM to Buy AMD? Seems Unlikely, But an Interesting Idea

Lenovo Licenses X64 Server Designs from IBM to Build Boxes

As I See It: Avatar Nation

SOA Remains Hard to Define, but Projects on the Rise

Four Hundred Stuff
i5/OS V6R1 Announced Today, Ships in March

System i VoIP from Nortel Expected Soon

Who Needs a Web Application Firewall?

Reigning In IT Chaos is the Goal of Innotas

Oracle Updates Tools for JD Edwards EnterpriseOne

Big Iron
CA Offers Mainframe Software Bundles and Freebie Services

Top Mainframe Stories From Around the Web

Chats, Webinars, Seminars, Shows, and Other Happenings

System i PTF Guide
January 26, 2008: Volume 10, Number 4

January 19, 2008: Volume 10, Number 3

January 12, 2008: Volume 10, Number 2

January 5, 2008: Volume 10, Number 1

December 29, 2007: Volume 9, Number 52

December 22, 2007: Volume 9, Number 51

The Windows Observer
Microsoft Moves to Solidify Virtualization Offerings

Microsoft to IBM: Tolerate PSI Mainframes or Quit Europe

Dell Launches New, Power-Efficient Blade Servers

E-Government Program Unveiled by Microsoft

Microsoft Rains on IBM's Lotusphere Parade

The Unix Guardian
Sun Asks ISVs Why They Love Solaris

Weak Dollar, Services, and Power6 Give IBM a Solid Fourth Quarter

IBM Aims for Server Expansion in 2008

SOA Remains Hard to Define, but Projects on the Rise

The Rumor Mill on IBM's Impending Platform Announcements

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

THIS ISSUE SPONSORED BY:

ProData Computer Services
Guild Companies
WorksRight Software


Printer Friendly Version


TABLE OF CONTENTS
Saving and Restoring External SQL Routine Definitions

Create Multiple Directory Levels in One Swell Foop

User Storage Limits and Application Processing

Four Hundred Guru

BACK ISSUES

From the IT Jungle Forums
FTP in arrival sequence

S36 environment problem

QSH won't write in batch!

SQL Trigger

usine switches in RPGIII???





 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement