Batchscript with VMFS driver

This is as-is, and AWSOME...ref http://code.google.com/p/vmfs/


THANK YOU http://www.fluidops.com/

@echo off
:: This was just something thrown together to semi-automate the copy of vm's to local disk
:: BLAZING SPEEDS
:: With a little more effort this would save so much time and can automate the backup of all vms on an ISCSI share.
SET DirList=E:\VMBackups\dir.txt
SET CopyFolder=WinXPIE7
SET Destination=E:\VMBackups
:: This assumes you already connected Iscsi and its Disk 1
SET iDrive=\\.\PhysicalDrive1
SET vmfscmd=java -jar C:\vmfs_r95\fvmfs.jar

%vmfscmd% %iDrive% dirall / >%DirList%

CALL:GOGETEM Copper
CALL:GOGETEM Silver
CALL:GOGETEM Gold

GOTO:EOF
:GOGETEM
FOR /F "tokens=4 delims= " %%G IN ('findstr %1 "%DirList%"') DO call:copyvmdata "%%G" "%1"

GOTO:EOF

:copyvmdata
SET vPath=%~1
SET vFolder=%~2
SET vPath=%vPath:/=\%

IF "%vPath%"=="/%vFolder%" GOTO:EOF
IF NOT EXIST "%Destination%/%vFolder%" MD "%Destination%/%vFolder%"
%vmfscmd% %iDrive% filecopy %1 %Destination%%vPath%

GOTO:EOF


~Enjoy

Comments :

0 comments to “Batchscript with VMFS driver”