- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
![2017 Âû¦~¥þ¶Ô¼ú³¹ 2017 Âû¦~¥þ¶Ô¼ú³¹](images/common/ji.gif) ![2016µU¦~¥þ¶Ô¼ú³¹ 2016µU¦~¥þ¶Ô¼ú³¹](images/common/hou.gif) ![2015¦Ï¦~¥þ¶Ô¼ú³¹ 2015¦Ï¦~¥þ¶Ô¼ú³¹](images/common/yang.gif) ![2014°¨¦~¥þ¶Ô¼ú³¹ 2014°¨¦~¥þ¶Ô¼ú³¹](images/common/ma.gif) ![2013³D¦~¥þ¶Ô¼ú³¹ 2013³D¦~¥þ¶Ô¼ú³¹](images/common/she.gif) ![2012Às¦~¥þ¶Ô¼ú³¹ 2012Às¦~¥þ¶Ô¼ú³¹](images/common/long.gif) ![½×¾Â°^Äm¾±³¹ ½×¾Â°^Äm¾±³¹](images/common/medal5.gif) ![¼ö¯P°Ñ»P¾±³¹ ¼ö¯P°Ñ»P¾±³¹](images/common/medal7.gif) ![2011¨ß¦~¥þ¶Ô¼ú³¹ 2011¨ß¦~¥þ¶Ô¼ú³¹](images/common/tu.gif)
|
¦^´_ 2# wufonna
'**Dir ·|¶Ç¦^²Ä¤@Ó»P_¸ô®|¦WºÙ_¬Û²ÅªºÀɮצWºÙ¡C Yn¨ú±o¥ô¦ó»P_¸ô®|¦WºÙ_¬Û²Åªº¨ä¥LÀɮצWºÙ¡A½Ð¦A¦¸©I¥s¤£§t¤Þ¼Æªº Dir
§AªþÀɪºµ{¦¡½X¦³ª¼ÂI If Dir(strPath, vbDirectory) = "" Then MkDir strPath
'**¤W¦¡µ{¦¡½X¦A¦¸¨Ï¥Î Dir(strPath, vbDirectory) ¾ÉP myname = Dir ¶Ç¦^ªÅ¦Û¦r¦ê
§A³oµ{¦¡½X¥i¥Hªº
¤]¥i¥ÎFileSystemObject ª«¥ó ¸Õ¸Õ- Option Explicit
- Sub Ex()
- Dim myPath As String, myFile As String, myname As String, n As Variant, strPath As String
- Dim AR(), Folder As String
- myPath = ThisWorkbook.Path & "\" 'myPath = ThisWorkbook.Path Àɮ׸ô®|
- myFile = "*.JPG"
- myname = Dir(myPath & myFile, vbDirectory) ' 'Dir ´M§äÀɮ׸ô®|\ *.JPG"ªºÀÉ®×
- Do While myname <> ""
- strPath = myPath & Replace(myname, ".jpg", "")
- With New FileSystemObject '¤Þ¥Î¶µ¥Ø Microsoft Scripting Runtime
- On Error Resume Next 'ªí¥Ü·í¤@Ó°õ¦æ¶¥¬q¿ù»~²£¥Í®É¡Aµ{¦¡±±¨î¥ß¨è¨ìµo¥Í¿ù»~³¯z¦¡±µ¤U¥hªº³¯z¦¡¡A¦ÓÄ~Äò°õ¦æ¤U¥h
- If .GetFolder(strPath) Is Nothing Then MkDir strPath '**¥[¤J¹Ï¤ù¦WºÙªº¸ê®Æ§¨
- On Error GoTo 0 '°±¤î²{¦bµ{§ÇùØ¥ô¦ó¤w±Ò°Êªº¿ù»~³B²zµ{¦¡
- End With
- myname = Dir
- Loop
- End Sub
½Æ»s¥N½X |
|