Hi !!! - @rem = '--*-Perl-*--
-
@echo off
-
if "%OS%" == "Windows_NT" goto WinNT
-
perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
-
goto endofperl
-
:WinNT
-
perl -x -S %0 %*
-
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
-
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
-
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
-
goto endofperl
-
@rem ';
-
#!/usr/bin/perl
-
use warnings;
-
use strict;
-
use File::Path;
-
use Cwd;
-
use File::Copy;
-
use File::Spec::Functions;
-
#hardcoded
-
my $FP = 'D:\conv';
-
my $TP = 'X:\sgml_db';
-
my $NAME = 'MMC1';
-
my ($from_file, $to_file) = ($ARGV[0], $ARGV[0]);
-
my $cwd = `cd`;
-
chomp $cwd;
-
my ($from_dir, $to_dir) = ($cwd, $cwd);
-
#rename file part
-
$to_file =~ s/.*\.(.+)/$NAME.$1/;
-
#rename dir part
-
$to_dir =~ s/^\Q$FP\E/$TP/;
-
mkpath($to_dir);
-
copy(catfile($from_dir, $from_file), catfile($to_dir, $to_file))
-
or die "can't copy file";
-
exit 0;
-
-
__END__
-
:endofperl
-
This script work perfectly and with file name with "interval", for example: PLB2 5284.tex,
but when I run script from "Main meniu" I get mistake.
You could it view in picture: 
Help me with this problem....!!!
I must have script....which send file with name with "interval" from "Main meniu".
4 1981
I would change line 33 to be: -
copy(catfile($from_dir, $from_file), catfile($to_dir, $to_file)) or die "can't copy file: $!";
-
The "$!" will print out the error that was produced from the copy attempt. Your error lets you know something was wrong, but unless you print out the actual received error, you won't know the real issue.
Regards,
Jeff
Hi !!!
Now i get mistake: -
can't copy file: No such file or directory at D:\MMC1.bat line 21.
-
V.
I would change line 33 to be: -
copy(catfile($from_dir, $from_file), catfile($to_dir, $to_file)) or die "can't copy file: $!";
-
The "$!" will print out the error that was produced from the copy attempt. Your error lets you know something was wrong, but unless you print out the actual received error, you won't know the real issue.
Regards,
Jeff
Hi !!!
Now i get mistake: -
can't copy file: No such file or directory at D:\MMC1.bat line 21.
-
V.
I would guess that one of the directories you are referencing in the code does not exist (or files).
Regards,
Jeff
Hi !!!
But when I call script in this manner: - script.bat ''file with spaces.txt''
My script work perfect...
V.
I would guess that one of the directories you are referencing in the code does not exist (or files).
Regards,
Jeff
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Thiru |
last post by:
Hi,
Greetings to All.
I have encountered a problem while working on DB2 Governer.
I build my configuration file as below.(Just for practise)
desc "Restrict the Unit of Work to be less then 1...
|
by: UnixSlaxer |
last post by:
Hello All,
While doing some TPC benchmark testing on DB2-UDB 8.2, I face the
following problem when running this query:
select *
from lineitem
where
l_shipdate <= date '1998-12-01' -...
|
by: Peter |
last post by:
When I issue
call sqlj.install_jar('file:///f:/jars/mail.jar','MAIL');
I get the messages
SQL4301N Java or .NET interpreter startup or communication failed,
reason
|
by: jchludzinski |
last post by:
Is there a format specification for printf that will result in: 1000000
being printed as 1,000,000? Or 1000000.0 as 1,000,000.0?
---John
|
by: Zygo Blaxell |
last post by:
I have a table with a few million rows of temperature data keyed
by timestamp. I want to group these rows by timestamp intervals
(e.g. every 32 seconds), compute aggregate functions on the...
|
by: Crash_beta |
last post by:
Let me show u what I have,, I need to make this work with comma's in
the numbers like 123,000.45
Not just 123000.45
<script type="text/javascript">
<!-- Begin
|
by: jonceramic |
last post by:
Hi guys,
I have a user who wants to have a report that shows only the 10th
value recorded by his equipment. (i.e. His equipment records
temperature every 30 seconds, but he only wants to view...
|
by: Tim Slattery |
last post by:
I'm trying to handle the onChange event in an <input type="file">
element. In IE, there's no problem: the event fires when a file in the
"open" box is doubleclicked, or the "Open" button in the box...
|
by: CuTe_Engineer |
last post by:
hii,
i have cs assignment i tried to solve it but i still have many
errors , plzz help mee :"< it`s not cheating becuz i`ve tried & wrote
the prog. i just wanna you to show me my mistakes
...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
|
by: SueHopson |
last post by:
Hi All,
I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...
| |