943,771 Members | Top Members by Rank

Ad:
  • Perl Discussion Thread
  • Unsolved
  • Views: 670
  • Perl RSS
Sep 3rd, 2008
0

How to sent file ?!

Expand Post »
Hello !!!

My directory D:\conv\ESSD\YJCIS\YJCIS14183\bbb.doc

I must send to X:\sgml_db\ESSD\YJCIS\YJCIS14183\
directory and rename bbb.doc to MMC1.doc.
If X:\sgml_db\...\....\YJCIS14183\ don't exist, i must create it.

"X:\sgml_db\" constant directory.

My script must choose path itself !
What I must add to this script !!!
perl Syntax (Toggle Plain Text)
  1. use strict;
  2. use warnings;
  3. use File::Copy;
  4. use File::Path;
  5.  
  6. my $sDest = 'X:/whatever';
  7. mkpath $sDest;
  8. copy('D:/whatever/bbb.doc', qq{$sDest/MMC1.doc});
Last edited by Narue; Sep 4th, 2008 at 9:32 am. Reason: added code tags
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
viktorijakup is offline Offline
8 posts
since Sep 2008
Sep 5th, 2008
0

Re: How to sent file ?!

Try reversing those / to \ or using two if that doesn't work:
D:\whatever\bbb.doc or
D:\\whatever\\bbb.doc or
D:\/whatever\/bbb.doc

The first \ is ignored and tells the interpreter to accept what comes next as OK.
Reputation Points: 94
Solved Threads: 8
Practically a Master Poster
khess is offline Offline
638 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Perl Forum Timeline: PERL column operations and deleting
Next Thread in Perl Forum Timeline: MySQL query error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC