You are here: Forum Home → ANT Developers Forums → ANT+ FIT Forum Has Moved → Thread
Sub RunJarJarBinks()
Dim FITfileFOLDER As Object
Dim FiLe As Object
Dim FSO As Object
Dim FLpath As String
Dim wb As Workbook
Dim FiLeCollect As Object
Dim repNAME As String
Set wb = ThisWorkbook
FLpath = wb.Path
Set FSO = CreateObject("scripting.filesystemobject")
Set FITfileFOLDER = FSO.GetFolder(FLpath)
Set FiLeCollect = FITfileFOLDER.Files
ChDir ThisWorkbook.Path
For Each FiLe In FiLeCollect
If Right(FiLe.Name, 4) = ".FIT" Then
repNAME = Replace(FiLe.Name, ".FIT", "") & "_session"
SHELL "java.exe -jar FitCSVTool.jar -b C:\users\devin\downloads\FIT_files\" & FiLe.Name & " C:\users\devin\downloads\FIT_files\" & repNAME & " --data"
Application.Wait (Now + 1 / 24 / 60 / 60 * 1)
End If
Next
ChDir ThisWorkbook.Path
For Each FiLe In FiLeCollect
If Right(FiLe.Name, 4) = ".FIT" Then
repNAME = Replace(FiLe.Name, ".FIT", "") & "_lap"
SHELL "java.exe -jar FitCSVTool.jar -b C:\users\devin\downloads\FIT_files\" & FiLe.Name & " C:\users\devin\downloads\FIT_files\" & repNAME & " --defn none --data lap"
Application.Wait (Now + 1 / 24 / 60 / 60 * 1)
End If
Next
End Sub
@echo off
setlocal EnableDelayedExpansion
set APP_DIR=%~dp0
set APP_NAME=FitCSVTool.jar
set APP_PATH="%APP_DIR%%APP_NAME%"
set a=%*
FOR %%b IN (!a!) DO (
set c=%%b
set c=!c:.fit=!
call java -jar %APP_PATH% -b %%b !c!
)
pause