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

Gast wer
 2012-02-19 13:25
#156226 #156226
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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);

print "!! $command !!\n";

exec($command);

die(qq[ERROR exec "$command" ($!)\n]);

Last edited: 2012-02-19 13:45:20 +0100 (CET)

View full thread Datum in Batch-Datei einfügen