954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to sent file ?!

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 !!!

use strict;
use warnings;
use File::Copy;
use File::Path;

my $sDest = 'X:/whatever';
mkpath $sDest;
copy('D:/whatever/bbb.doc', qq{$sDest/MMC1.doc});
viktorijakup
Newbie Poster
8 posts since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

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.

khess
Practically a Posting Shark
804 posts since Apr 2008
Reputation Points: 94
Solved Threads: 8
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You