09-06-2009, 23:27
|
|
מנהל פורום מערכות הפעלה - הרובע המייקרוסופטי.
|
|
חבר מתאריך: 07.10.04
הודעות: 13,777
|
|
שיעמם לי אז כתבתי בשבילך משהו...
תעתיק את הקוד הבא לקובץ c:\1.vbs
קוד:
Set fs = WScript.CreateObject ("Scripting.FileSystemObject")
Dim fso, folder, files, NewsFile,sFolder
Sub ShowSubFolders(Folder)
Set NewFile = fso.OpenTextFile (".\FileList.txt", 8, True)
For Each Subfolder In Folder.SubFolders
Set files = SubFolder.Files
For Each file In files
NewFile.WriteLine(Folder&"\"&file.Name)
Next
NewFile.Close
ShowSubFolders Subfolder
Next
End Sub
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = Wscript.Arguments.Item(0)
If sFolder = "" Then
Wscript.Echo "No Folder parameter was passed"
Wscript.Quit
End If
Set NewFile = fso.CreateTextFile(".\FileList.txt", True)
NewFile.Close
ShowSubFolders fs.GetFolder(sFolder)
תפתח חלון CMD ותכתוב את הפקודה הבאה:
קוד:
cscript c:\1.vbs c:\
כאשר אתה יכול לבחור איזו תיקייה שאתה רוצה.
הפלט יהיה לך בקובץ filelist.txt מהתיקייה ממנה אתה מריץ את הסקריפט.
_____________________________________
נערך לאחרונה ע"י קוביבי בתאריך 09-06-2009 בשעה 23:30.
|