BattleDroid42
Programmer
Has anyone out there programmed a way to FTP files from Microsoft Access? Here's the core of what I would like to be able to do:
For y = 1 To z
For x = a To b
strDay = Format(x, "00"
strDatabase = Forms![frmStatusByDatabase02]![Database]
strFrom = LCase(strSourcePath & strDatabase & "\LG" & strMonth & strDay & strYear & ".DAT"
strRecip01 = LCase(strDestinationPath & strDatabase & "\LG" & strMonth & strDay & strYear & ".TXT"
SysCmd acSysCmdSetStatus, "Processing " & strFrom & " to " & strRecip01
If FileExists(strFrom) = True Then
MkDir strDestinationPath & strDatabase
FileCopy strFrom, strRecip01
Else
End If
Next x
DoCmd.GoToRecord acDataForm, "frmStatusByDatabase02", acNext
Next y
Basically the user enters a date range in a dialog box setting all the date variables. The routine will pull all the files in a pre-specified list of directories for the date range entered.
The outer loop changes the "database" folder name and the inner loop pulls a variable number of date stamped files. I want to replace the FileCopy command with FTP commands and place the files from the UNIX box in local directories for later import into Access. All of the variables are stored in tables.
For y = 1 To z
For x = a To b
strDay = Format(x, "00"
strDatabase = Forms![frmStatusByDatabase02]![Database]
strFrom = LCase(strSourcePath & strDatabase & "\LG" & strMonth & strDay & strYear & ".DAT"
strRecip01 = LCase(strDestinationPath & strDatabase & "\LG" & strMonth & strDay & strYear & ".TXT"
SysCmd acSysCmdSetStatus, "Processing " & strFrom & " to " & strRecip01
If FileExists(strFrom) = True Then
MkDir strDestinationPath & strDatabase
FileCopy strFrom, strRecip01
Else
End If
Next x
DoCmd.GoToRecord acDataForm, "frmStatusByDatabase02", acNext
Next y
Basically the user enters a date range in a dialog box setting all the date variables. The routine will pull all the files in a pre-specified list of directories for the date range entered.
The outer loop changes the "database" folder name and the inner loop pulls a variable number of date stamped files. I want to replace the FileCopy command with FTP commands and place the files from the UNIX box in local directories for later import into Access. All of the variables are stored in tables.