Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: directories with spaces

by dhjackal (Initiate)
on Nov 08, 2006 at 10:24 UTC ( [id://582845]=note: print w/replies, xml ) Need Help??


in reply to Re: directories with spaces
in thread directories with spaces

Thanks davorg, I managed to resolve the issue, the error i was getting was

Cannot mkdir D:/Temp/ExpImpTest2/Declan test/here/Logs: No such file o +r directory at C:\Documents and Settings\dheerey\Desktop\Development\ +Perl\PSGUtility\test2.pl line 38, <DATA> line 164

In the end i moved from mkdir to mkpath and removed the double quotes from my path name. The code now looks (and works) like:

use File::Path ; my $dir = 'D:\Temp\ExpImpTest2\Declan test2\here\Logs' ; $dir =~ s/\\/\//g ; mkpath ($dir) || die "Cannot create $dir: $!" ;

Thanks again

20061109 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

Replies are listed 'Best First'.
Re^3: directories with spaces
by Hofmator (Curate) on Nov 08, 2006 at 10:30 UTC
    Using <code> tags makes your posts much easier to read, see also Writeup Formatting Tips.

    -- Hofmator

    Code written by Hofmator and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://582845]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-18 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found