Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Can't reproduce the problem under W2k and AS 5.8.8.

perl -v
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 33 registered patches, see perl -V for more detail)
...
Binary build 819 [267479] provided by ActiveState http://www.ActiveState.com Built Aug 29 2006 12:42:41

OP's path is only 62 chars, at most, so that's not the issue. So, starting with no directory, "test," extant in C:\

C:\>dir t* ... Directory of C:\ 09/04/2006 11:26a <DIR> TEMP 0 File(s) 0 bytes 1 Dir(s) 10,945,437,696 bytes free

Quoting varied from OP's, solely (AFAIK) because the following is run as a one-liner:

C:\>perl -e "if (!-d 'c:/test') {mkdir 'c:/test1';}" C:\>dir t* ... Directory of C:\ 09/04/2006 11:26a <DIR> TEMP 02/02/2008 10:14p <DIR> test1 0 File(s) 0 bytes 2 Dir(s) 10,945,437,696 bytes free

...and, further variance this time in both quoting and slash direction:

C:\>perl -e "if (!-d 'c:/test') {mkdir \"c:/test\";}" C:\>dir t* ... Directory of C:\ 09/04/2006 11:26a <DIR> TEMP 02/02/2008 10:17p <DIR> test 02/02/2008 10:14p <DIR> test1 0 File(s) 0 bytes 3 Dir(s) 10,945,404,928 bytes free

So, are you sure your code is not working? ...sure that E:\ exists and is writable? ... Update - addition ...sure that all the dirs between E:\ and the first you're trying to create actually exist? (See the second bullet in plobsing's reply, above.)


In reply to Re: Creating new folders by ww
in thread Creating new folders by Eagle_f91

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2021-10-22 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?