Sub ShowFolderInfo() Dim folderspec$ Dim filename$ folderspec = "E:huoqutest" 'Debug.Print folderspec Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(folderspec) 's = f.DateCreated 'MsgBox s 'p = f.Path 'MsgBox p 'n = f.Name 'MsgBox n
For Each ff In f.SubFolders m = m + 1 Cells(m, 1) = ff.Name filepath = "E:huoqutest" & ff.Name & "" Debug.Print filepath filename = Dir(filepath) Debug.Print filename Do While filename <> ""
ss = ss & filename ss = ss & vbCrLf filename = Dir Debug.Print filename Loop n = n + 1 Cells(n, 4) = ss ss = ""
mkdir COREinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesCMSISCM3CoreSupportcore_cm3.h .COREinc
mkdir COREsrc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesCMSISCM3CoreSupportcore_cm3.c .COREsrc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesCMSISCM3DeviceSupportSTSTM32F10xstartuparmstartup_stm32f10x_hd.s .COREsrc
::crate USER file and main.c stm32f10x_inconf.h
mkdir USER
cd.>USERstm32f10x_inconf.h
echo "#include "stm32f10x.h"" > .USERstm32f10x_inconf.h
cd.>USERmain.c
echo "#include "stm32f10x_inconf.h"" > .USERmain.c
::creat STMLIB and copy gpio.c/.h rcc.c/.h misc.c/.h usart.c/.h
mkdir STMLBsrc
mkdir STMLBinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesSTM32F10x_StdPeriph_Driverincstm32f10x_gpio.h .STMLBinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesSTM32F10x_StdPeriph_Driversrcstm32f10x_gpio.c .STMLBsrc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesSTM32F10x_StdPeriph_Driverincstm32f10x_usart.h .STMLBinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesSTM32F10x_StdPeriph_Driversrcstm32f10x_usart.c .STMLBsrc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesSTM32F10x_StdPeriph_Driverincstm32f10x_rcc.h .STMLBinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesSTM32F10x_StdPeriph_Driversrcstm32f10x_rcc.c .STMLBsrc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesSTM32F10x_StdPeriph_Driverincmisc.h .STMLBinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesSTM32F10x_StdPeriph_Driversrcmisc.c .STMLBsrc
::creat STMLB_COMMON file and copy common file
mkdir STMLB_COMMONsrc
mkdir STMLB_COMMONinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesCMSISCM3DeviceSupportSTSTM32F10xsystem_stm32f10x.c .STMLB_COMMONsrc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0ProjectSTM32F10x_StdPeriph_Templatestm32f10x_it.c .STMLB_COMMONsrc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesCMSISCM3DeviceSupportSTSTM32F10xstm32f10x.h .STMLB_COMMONinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0LibrariesCMSISCM3DeviceSupportSTSTM32F10xsystem_stm32f10x.h .STMLB_COMMONinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0ProjectSTM32F10x_StdPeriph_Templatestm32f10x_conf.h .STMLB_COMMONinc
copy ..STM32F10x_StdPeriph_Lib_V3.5.0ProjectSTM32F10x_StdPeriph_Templatestm32f10x_it.h .STMLB_COMMONinc
::creat OBJ file about hex file
mkdir OBJ
::creat HARDWARE
mkdir HARDWARE
cd.>HARDWAREled.h
cd.>HARDWAREled.c
mkdir SYSTEMdelay
mkdir SYSTEMusart
mkdir SYSTEMsys
mkdir "source insight"
Dim folderspec$
Dim filename$
folderspec = "E:huoqutest"
'Debug.Print folderspec
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
's = f.DateCreated
'MsgBox s
'p = f.Path
'MsgBox p
'n = f.Name
'MsgBox n
For Each ff In f.SubFolders
m = m + 1
Cells(m, 1) = ff.Name
filepath = "E:huoqutest" & ff.Name & ""
Debug.Print filepath
filename = Dir(filepath)
Debug.Print filename
Do While filename <> ""
ss = ss & filename
ss = ss & vbCrLf
filename = Dir
Debug.Print filename
Loop
n = n + 1
Cells(n, 4) = ss
ss = ""
Next
End Sub
一周热门 更多>