Advertisement

04.23.2008 at 04:22PM PDT, ID: 23348681
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

Perl script to copy files from one directory to other that is mounted

Asked by gusindhura in Perl Programming Language, Samba File Server

Tags:

Using samba I mounted a UNIX folder into windows folder.
Now I am trying to get a perl script that copied files from C:\ to this mounted drive which is called - S:

Following is the script I have so far -

#!/usr/bin/perl -w

use File::Copy;

$TIME_STAMP=`perl -e'@x=localtime time-86400;printf"%4d_%02d_%02d\n",$x[5]+1900,$x[4]+1,$x[3]'`; # to get yesterday's date
$PATH1 = "\\itkm-kcc1\Knova home\Platform\Log"; # source file1 location
$PATH2 = "\\itkm-kcc2\Knova home\Platform\Log"; # source file2 location
$FILE1 = "general_activity-Production-ITKM-KCC1-.-$TIME_STAMP"; # source file 1 name
$FILE2 = "general_activity-Production-ITKM-KCC2-.-$TIME_STAMP"; # source file 2 name

#net use s: \\soca01\user; #used to mount the shared drive

opendir(IMD1, $PATH1) || die("Cannot open directory");
if (-e $FILE1)
{
copy($FILE1, S:\$FILE1) || die ("File cannot be copied");
}
closedir(IMD1);

opendir(IMD2, $PATH2) || die("Cannot open directory");
if (-e $FILE2)
{
copy($FILE2, S:\$FILE2) || die("File cannot be copied");
}
closedir(IMD2);

But this script is throwing syntax errors at various steps -

syntax error in file perl_copyfiles at line 3, next 2 tokens "use File"
syntax error in file perl_copyfiles at line 16, next 2 tokens "copy("
Spurious backslash ignored at perl_copyfiles line 16.
syntax error in file perl_copyfiles at line 23, next 2 tokens "copy("
Spurious backslash ignored at perl_copyfiles line 23.
Execution of perl_copyfiles aborted due to compilation errors.

I am new to perl scripting and having hard time trying to debug this.
Also please let me know how to automate this script using cron.

Your help is appreciated.

Thanks

Start Free Trial
[+][-]04.23.2008 at 05:39PM PDT, ID: 21426791

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 05:47PM PDT, ID: 21426833

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 08:01AM PDT, ID: 21431624

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 08:51AM PDT, ID: 21432211

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 08:53AM PDT, ID: 21432224

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 08:56AM PDT, ID: 21432278

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 08:57AM PDT, ID: 21432292

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 09:09AM PDT, ID: 21432443

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 09:10AM PDT, ID: 21432449

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 09:50AM PDT, ID: 21432850

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 09:55AM PDT, ID: 21432889

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 09:57AM PDT, ID: 21432905

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 10:18AM PDT, ID: 21433092

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 10:42AM PDT, ID: 21433324

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 09:24AM PDT, ID: 21441018

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 10:11AM PDT, ID: 21441403

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 03:33PM PDT, ID: 21443639

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 04:15PM PDT, ID: 21443800

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 04:34PM PDT, ID: 21443857

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Perl Programming Language, Samba File Server
Tags: Perl
Sign Up Now!
Solution Provided By: FishMonger
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.28.2008 at 09:36AM PDT, ID: 21455457

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.28.2008 at 10:51AM PDT, ID: 21456023

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080924-EE-VQP-39 / EE_QW_2_20070628