ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó¥ÎCMD§R°£¸ê®Æ§¨©O

[µo°Ý] ¦p¦ó¥ÎCMD§R°£¸ê®Æ§¨©O

½Ð°Ý¤j¤j
¦pªG§Ú¦³¤@¤j°ï¸ê®Æ§¨
AAAAA
AAA01
AAASFGV
ADCVVB
VGBVB
DGGBDF
Ãþ¦ü³o¨Ç¶Ã¼ÆªºÀɦW¸ê®Æ§¨
§Ú¥u­n§R°£¶}ÀYAA¸ê®Æ§¨¥þ³¡´N¥i¥H
¸Ó«ç»ò¼g©O?

  1. del AA*.*
  2. rd AA*.
½Æ»s¥N½X
windows XP/7¥i¥Î

TOP

¦^´_ 2# downling

¤j¤j¤£¦æ®@
§Aªº¤èªk¤£¯à¥Î

TOP

¨º­Ó¦a¤è¤£¦æ?
¥X²{¤°»ò¸ê°T?

TOP

¦^´_ 4# downling


    ¤j¤j §A¦Û¤v¦³¥ý¦æ¸Õ¬Ý¬Ý¶Ü?

¥L»¡ ÀɮצWºÙ¡B¥Ø¿ý¦WºÙ©ÎºÏºÐ°Ï¼ÐÅÒ»yªk¿ù»~¡C

TOP

¦^´_ 5# v60i

§Ñ¤Frd¤£¦Y¸U¥Î¦r¤¸
§A¥i¥H¥h§ì98ªºdeltree.exe¨Ó¥Î
©Î¬Oºô¸ô¤W¦³¤H¶K¥X¨Óªº¤@½g
§A¥i¥H¦Û¤v¸Õ¤@¤U
  1. Option Explicit

  2. Dim objFSO, objTempFolder, strTempFolder

  3. Const TEMP_FOLDER = 2

  4. Set objFSO        = CreateObject( "Scripting.FileSystemObject" )
  5. Set objTempFolder = objFSO.GetSpecialFolder( TEMP_FOLDER )
  6. strTempFolder     = objTempFolder.Path

  7. DelTree strTempFolder, True


  8. Sub DelTree( myFolder, blnKeepRoot )
  9. ' With this subroutine you can delete folders and their content,
  10. ' including subfolders.
  11. '
  12. ' You can specify if you only want to empty the folder, and thus
  13. ' keep the folder itself, or to delete the folder itself as well.
  14. ' Root directories and some (not all) vital system folders are
  15. ' protected: if you try to delete them you'll get a message that
  16. ' deleting these folders is not allowed.
  17. '
  18. ' Use: Deltree.vbs <Path to delete>, True (false)
  19. '
  20. ' Arguments:
  21. ' myFolder     [string]   the folder to be emptied or deleted
  22. ' blnKeepRoot  [boolean]  if True, the folder is emptied only,
  23. '                         otherwise it will be deleted itself too
  24. '
  25. '
  26.     Dim arrSpecialFolders(3)
  27.     Dim objMyFSO, objMyFile, objMyFolder, objMyShell
  28.     Dim objPrgFolder, objPrgFolderItem, objSubFolder, wshMyShell
  29.     Dim strPath, strSpecialFolder

  30.     Const WINDOWS_FOLDER =  0
  31.     Const SYSTEM_FOLDER  =  1
  32.     Const PROGRAM_FILES  = 38

  33.     ' Use custom error handling
  34.     On Error Resume Next

  35.     ' List the paths of system folders that should NOT be deleted
  36.     Set wshMyShell       = CreateObject( "WScript.Shell" )
  37.     Set objMyFSO         = CreateObject( "Scripting.FileSystemObject" )
  38.     Set objMyShell       = CreateObject( "Shell.Application" )
  39.     Set objPrgFolder     = objMyShell.Namespace( PROGRAM_FILES )
  40.     Set objPrgFolderItem = objPrgFolder.Self

  41.     arrSpecialFolders(0) = wshMyShell.SpecialFolders( "MyDocuments" )
  42.     arrSpecialFolders(1) = objPrgFolderItem.Path
  43.     arrSpecialFolders(2) = objMyFSO.GetSpecialFolder( SYSTEM_FOLDER  ).Path
  44.     arrSpecialFolders(3) = objMyFSO.GetSpecialFolder( WINDOWS_FOLDER ).Path

  45.     Set objPrgFolderItem = Nothing
  46.     Set objPrgFolder     = Nothing
  47.     Set objMyShell       = Nothing
  48.     Set wshMyShell       = Nothing

  49.     ' Check if a valid folder was specified
  50.     If Not objMyFSO.FolderExists( myFolder ) Then
  51.         WScript.Echo "Error: path not found (" & myFolder & ")"
  52.         WScript.Quit 1
  53.     End If
  54.     Set objMyFolder = objMyFSO.GetFolder( myFolder )

  55.     ' Protect vital system folders and root directories from being deleted
  56.     For Each strSpecialFolder In arrSpecialFolders
  57.         If UCase( strSpecialFolder ) = UCase( objMyFolder.Path ) Then
  58.             WScript.Echo "Error: deleting """ _
  59.                        & objMyFolder.Path & """ is not allowed"
  60.             WScript.Quit 1
  61.         End If
  62.     Next

  63.     ' Protect root directories from being deleted
  64.     If Len( objMyFolder.Path ) < 4 Then
  65.         WScript.Echo "Error: deleting root directories is not allowed"
  66.         WScript.Quit 1
  67.     End If

  68.     ' First delete the files in the directory specified
  69.     For Each objMyFile In objMyFolder.Files
  70.         strPath = objMyFile.Path
  71.         objMyFSO.DeleteFile strPath, True

  72.     Next

  73.     ' Next recurse through the subfolders
  74.     For Each objSubFolder In objMyFolder.SubFolders
  75.         DelTree objSubFolder, False
  76.     Next

  77.     ' Finally, remove the "root" directory unless it should be preserved
  78.     If Not blnKeepRoot Then
  79.         strPath = objMyFolder.Path
  80.         objMyFSO.DeleteFolder strPath, True

  81.     End If

  82.     ' Clean-up after thyself
  83.     On Error Goto 0
  84.     Set objMyFolder = Nothing
  85.     Set objMyFSO    = Nothing
  86. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# downling


   ¤j¤j
½Ð°Ý³o¬OvbÁÙ¬Ocmd??

TOP

¤Þ¥Î­ì¤å
If you wanted to delete the contents of the directory c:\Temp, but not remove the TEMP directory, usage would be:

DELTREE.vbs c:\Temp, TRUE

If you wish to delete the contents of c:\Temp, AND the directory c:\temp...

DELTREE.vbs c:\Temp, FALSE


¥N½X´N¬O¤W­±poªº

Note: Just copy the code above, paste it into notepad, and save it as DELTREE.vbs (or whatever you wish to name it). Run it from a command prompt. You may have to use a fully qualified path depending on where you save it.

TOP

¦^´_ 8# downling


    s@@ ¬Ý¨Ó¯uªº¥u¯à¥ÎvbÅo

TOP

»Ý­n¥Î vb ¶Ü?? ª½±µ¦b cmd ¤U¥Î dir >1.txt ±N©Ò¦³ÀÉ®×¼g¦¨ 1.txt «á, ¦A¶i Excel ¤¤§â¤£­nªºÀÉ, «e­±¥[¤@Äæ, ¨ºÄ椤¥[¤W del, ¦A±N Excel ªºÀÉcopy ©Î ¼g¦¨¤å¦rÀÉ, Åܦ¨ .bat ÀɧY¥i, ¤£¨ì 10 ¤ÀÄÁ·d©w.

TOP

        ÀR«ä¦Û¦b : °ß¨ä´L­«¦Û¤vªº¤H¡A¤~§ó«i©óÁY¤p¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD