C
chris yoker via DotNetMonster.com
hiya,
I have a DIR that should only accept .CSV files..I haven't found a way to
do this prorgramatically.
ATM, I:
1) obtain an array of all the files that contain a .CSV extension.
2) move these files to another dir.
I check to see if there are any NON-CSV files in the dir by the following:
<code>
If arrAllFiles.Length = arrCsvFiles.Length Then
'do nothing, as this DIR only contained CSV files.
Else
'delete ALL the files in this dir, as the CSV files have already been
moved.
'The remaining files are therefore, NON-CSV
End If
<\code>
Is this a good approach?Or maybe there is a slicker way to achieve what I
am trying to do / maybe there are some utilities out there that already do
all the system.IO stuff?
All thoughts appreciated.
many thanks
yogi
I have a DIR that should only accept .CSV files..I haven't found a way to
do this prorgramatically.
ATM, I:
1) obtain an array of all the files that contain a .CSV extension.
2) move these files to another dir.
I check to see if there are any NON-CSV files in the dir by the following:
<code>
If arrAllFiles.Length = arrCsvFiles.Length Then
'do nothing, as this DIR only contained CSV files.
Else
'delete ALL the files in this dir, as the CSV files have already been
moved.
'The remaining files are therefore, NON-CSV
End If
<\code>
Is this a good approach?Or maybe there is a slicker way to achieve what I
am trying to do / maybe there are some utilities out there that already do
all the system.IO stuff?
All thoughts appreciated.
many thanks
yogi