How to sent file ?!

Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2008
Posts: 8
Reputation: viktorijakup is an unknown quantity at this point 
Solved Threads: 0
viktorijakup viktorijakup is offline Offline
Newbie Poster

How to sent file ?!

 
0
  #1
Sep 3rd, 2008
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 !!!
  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
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 470
Reputation: khess is on a distinguished road 
Solved Threads: 8
Staff Writer
khess's Avatar
khess khess is offline Offline
Staff Writer

Re: How to sent file ?!

 
0
  #2
Sep 5th, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Perl Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC