Page 1 of 1 1
Topic Options
#132976 - 2005-01-25 11:23 PM Checking file Versions with Kixtart
Huffinagle Offline
Getting the hang of it
*****

Registered: 2002-09-04
Posts: 75
Loc: McMinnville, OR, USA
Hello all,

Has anyone used Kixtart to check the version of a file? Here's what I want to do in laymen's terms.

::::::::

if ingroup ("finance")
check if file "c:\folder\file.exe" exists
if exists, check file version
if file version =1.1
do nothing
else copy file "u:\networkfolder\file.exe" "c:\folder\"
if file doesn't exist copy "u:\networkfolder\file.exe" "c:\folder"

:::::::::

Thanks for any help/direction you can provide.

Matthew

Top
#132977 - 2005-01-25 11:31 PM Re: Checking file Versions with Kixtart
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See GETFILEVERSION() in the KiXtart Manual.
_________________________
There are two types of vessels, submarines and targets.

Top
#132978 - 2005-01-25 11:37 PM Re: Checking file Versions with Kixtart
Huffinagle Offline
Getting the hang of it
*****

Registered: 2002-09-04
Posts: 75
Loc: McMinnville, OR, USA
Perfect suggestion.

Do you have any suggestions on the "if else" steps in the example I gave?

Top
#132979 - 2005-01-25 11:56 PM Re: Checking file Versions with Kixtart
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Code:

$file='c:\folder\file.exe'
IF INGROUP('group')
IF NOT GETFILEVERSION($file,'FileVersion')
COPY 'u:\networkfolder\file.exe' 'c:\folder\'
ENDIF
ENDIF

_________________________
There are two types of vessels, submarines and targets.

Top
#132980 - 2005-01-26 12:55 AM Re: Checking file Versions with Kixtart
Huffinagle Offline
Getting the hang of it
*****

Registered: 2002-09-04
Posts: 75
Loc: McMinnville, OR, USA
Thank you. That code makes sense. Can I specify several different files with the '$file' variable, such as:

$file1='c:\folder\programA.exe
$file2='c:\folder\programB.exe
etc....

Thank you for your expert advice.

-Matthew

Top
#132981 - 2005-01-26 01:41 AM Re: Checking file Versions with Kixtart
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Yes, but if you're going to do a lot you may want to place it into some type of an array.
Top
#132982 - 2005-01-30 02:50 PM Re: Checking file Versions with Kixtart
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Code:

$asFiles='file1.exe','file2.exe'
$sDirFrom='c:\test_from\'
$sDirTo='c:\test_to\'
for each $sFile in $asFiles
$sFileFrom=$sDirFrom+$sFile
$sFileTo=$sDirTo+$sFile
; test fileversion and copy
next

_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 580 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.055 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org