Thread Datum in Batch-Datei einfügen (33 answers)
Opened by pomaranc at 2012-02-10 14:38

pomaranc
 2012-02-22 17:17
#156335 #156335
User since
2011-05-11
18 Artikel
BenutzerIn
[default_avatar]
OK, dann ist hier der Text.

Quote
Can't locate Date/Calc.pm in @INC (@INC contains: C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/lib .) at D:\skript.pl line 4. BEGIN failed--compilation aborted at D:\skript.pl line 4.


Das Skript dazu sieht so aus:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl
use strict;
use warnings;
use Date::Calc 'Date_to_Time';

my $command='"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "Adobe Acrobat" --biossystemtimeoffset -%s';
my $date='14.10.2011';

my $time=time();
$time-=Date_to_Time(reverse(split(/\./,$date)),0,0,0);
$time*=1000;

$command=sprintf($command,$time);

$command=exec($command) or die(qq[ERROR exec "$command" ($!)\n]);
die("Something went wrong!\n");

View full thread Datum in Batch-Datei einfügen