rupesh has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks!
Another interesting query:
I have filenames in the format
862003_PRODUCT1_HOST1_NAME1_NAME2.txt 862003_PRODUCT1_HOST1_NAME1_NAME3.txt 862003_PRODUCT1_HOST1_NAME4.txt 862003_PRODUCT1_HOST1_SUMMARY.html 862003_PRODUCT1_HOST2_NAME1_NAME2.txt 862003_PRODUCT1_HOST2_NAME1_NAME3.txt 862003_PRODUCT1_HOST2_NAME4.txt 862003_PRODUCT1_HOST2_SUMMARY.html
in a directory. The html file has three links which point to the three text files.
What I want is to create a folder with the date (862003),
under which to create another folder called PRODUCT1,
and then put the files HOST1_NAME1_NAME2.txt, HOST1_NAME4.txt and HOST1_SUMMARY.html
Im OK with the creation of the links in the html to point to the respective text files. Im confused with the creation of the directories! This is supposed to be done both in UNIX as well as WINDOWS.
Thanks

we're born with our eyes closed and our mouths wide open, and we spend our entire life trying to rectify that mistake of nature. - anonymous.

20030808 Edit by jeffa: Changed title from 'FileNames and Directories '

Replies are listed 'Best First'.
Re: How to create a directory
by chromatic (Archbishop) on Aug 07, 2003 at 03:43 UTC

    Are you looking for the mkdir operator? What, specifically, is confusing?

Re: How to create a directory
by snax (Hermit) on Aug 07, 2003 at 19:01 UTC
    Worrying about \ vs /? Don't :)

    Just use the *nix convention for the path separator; it'll be fine under Win32 with both ActiveState and cygwin perl implementations.

    Then use mkdir as suggested above.