Re: Fwd: mkdir questions on unix platform
At 16:15 2004-11-15, Ella Cai wrote: Let me make question clear, in fact my question is how can i create directories recursively. mkpath http://search.cpan.org/~nwclark/perl-5.8.5/lib/File/Path.pm /J -- --- -- -- -- - - -- - Johan LindströmSourcerer @ Boss Casinos johanl AT DarSerMan.com Latest bookmark: "TCP Connection Passing" http://tcpcp.sourceforge.net/ dmoz: /Computers/Programming/Languages/JavaScript/ 12 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: mkdir questions on unix platform
mkdir -p /path/to/some/new/directory on unix will create the entire path if you have the rights to do so. use File::Path; mkpath('/path/to/some/directory/or/other',0,0755); perldoc File::Path; perldoc umask man umask man mkdir Kind regards, Mark Anderson Service Improvement Project Level 2, 113 Dundas Street Edinburgh, EH3 5DE Tel: 0131 523 8786 Mob: 07808 826 063 > -Original Message- > From: Ella Cai [SMTP:[EMAIL PROTECTED] > Sent: Monday, November 15, 2004 3:15 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Fwd: mkdir questions on unix platform > > *** WARNING : This message originates from the Internet *** > > > Let me make question clear, in fact my question is how can i create > directories recursively. > > Do you have any example? > > Thanks > > Lixin > > Note: forwarded message attached. > > _ > > Do you Yahoo!? > Check out the new Yahoo! Front Page. www.yahoo.com <http://www.yahoo.com> > << Message: mkdir questions on unix platform >> << File: ATT3372979.txt > >> The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB The Royal Bank of Scotland plc is authorised and regulated by the Financial Services Authority and represents The Royal Bank of Scotland Marketing Group. The Bank sells life policies, collective investment schemes and pension products and advises only on the Marketing Group's range of these products and on a With-Profit Bond produced by Norwich Union Life (RBS) Limited. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Fwd: mkdir questions on unix platform
Let me make question clear, in fact my question is how can i create directories recursively. Do you have any example? Thanks LixinNote: forwarded message attached. Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com--- Begin Message --- My codes is like this: ** my $new_data_dir = "/var/tmp/sct_1.61/data"; mkdir ($new_data_dir, 0744) unless (-d $new_data_dir); ** /var/tmp exists, but /sct_1.61/data does not exist under /var/tmp. It looks like mkdir function does not work well. It does not create /sct_1.61/data. Could you please let me know why? and how to solve it? Thanks Lixin __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs --- End Message --- ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: mkdir questions on unix platform
Try using use File::Path; #see the docs mkpath will emulate a unix mkdir -p Kind regards, Mark Anderson Service Improvement Project Level 2, 113 Dundas Street Edinburgh, EH3 5DE Tel: 0131 523 8786 Mob: 07808 826 063 > -Original Message- > From: Ella Cai [SMTP:[EMAIL PROTECTED] > Sent: Monday, November 15, 2004 2:22 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: mkdir questions on unix platform > > *** WARNING : This message originates from the Internet *** > > > My codes is like this: > ** > my $new_data_dir = "/var/tmp/sct_1.61/data"; > mkdir ($new_data_dir, 0744) unless (-d $new_data_dir); > ** > > /var/tmp exists, but /sct_1.61/data does not exist under /var/tmp. It > looks like mkdir function does not work well. It does not create > /sct_1.61/data. Could you please let me know why? and how to solve it? > > Thanks > > Lixin > > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com << File: ATT2352909.txt >> The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB The Royal Bank of Scotland plc is authorised and regulated by the Financial Services Authority and represents The Royal Bank of Scotland Marketing Group. The Bank sells life policies, collective investment schemes and pension products and advises only on the Marketing Group's range of these products and on a With-Profit Bond produced by Norwich Union Life (RBS) Limited. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
mkdir questions on unix platform
My codes is like this: ** my $new_data_dir = "/var/tmp/sct_1.61/data"; mkdir ($new_data_dir, 0744) unless (-d $new_data_dir); ** /var/tmp exists, but /sct_1.61/data does not exist under /var/tmp. It looks like mkdir function does not work well. It does not create /sct_1.61/data. Could you please let me know why? and how to solve it? Thanks Lixin __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs