回答編集履歴
2
調整
test
CHANGED
@@ -23,3 +23,5 @@
|
|
23
23
|
msgbox join(a,vbcrlf)
|
24
24
|
Set rs = Nothing
|
25
25
|
```
|
26
|
+
※FileSystemObjectはソート機能があるので直接ソートできそうですね。
|
27
|
+
汎用的な処理ということで理解ください
|
1
調整
test
CHANGED
@@ -2,15 +2,9 @@
|
|
2
2
|
```vba
|
3
3
|
Set rs = CreateObject("ADODB.Recordset")
|
4
4
|
rs.fields.Append "filename",200,50
|
5
|
-
set args= wscript.arguments
|
6
5
|
set oWSH =WScript.CreateObject("WScript.Shell")
|
7
6
|
set fs = CreateObject("Scripting.FileSystemObject")
|
8
|
-
if args.count=0 then
|
9
|
-
msgbox "ファイルを落としてください。"
|
10
|
-
exit sub
|
11
|
-
end if
|
12
|
-
|
13
|
-
set d=fs.GetFolder(
|
7
|
+
set d=fs.GetFolder(指定ディレクトリ)
|
14
8
|
rs.open
|
15
9
|
For Each f In d.Files
|
16
10
|
rs.AddNew
|