Results 1 to 1 of 1
Thread: , !
Hybrid View
-
30th December 2009 03:47 #1
, !
VBScript , . .
, .
:
:Code:Dim fso, ws, Args, clip, Title Set fso = CreateObject("Scripting.FileSystemObject") Set ws = CreateObject("Wscript.Shell") Set Args = WScript.Arguments Set clip = CreateObject("WshExtra.Clipboard") Title = "Create New Folder" Call MakeNewFolderClipboard Call Cleanup Sub MakeNewFolderClipboard Dim NewFldr NewFldr = clip.Paste() If NewFldr = "" Then Call Cleanup On Error Resume Next fso.CreateFolder fso.GetFolder(Args(0)) & "\" & NewFldr If Err.Number = 58 Then Err.Clear:On Error GoTo 0 ws.Popup Chr(34) & NewFldr & Chr(34) & " already exists.", ,Title, 0 + 48 + 4096 Call MakeNewFolderInputBox Exit Sub ElseIf Err.Number = 52 Then Err.Clear:On Error GoTo 0 ws.Popup Chr(34) & NewFldr & Chr(34) & " contains invalid character(s).", ,Title, 0 + 48 + 4096 Call MakeNewFolderInputBox Exit Sub End If ws.Run fso.GetFolder(Args(0)) & "\" & NewFldr End Sub Sub MakeNewFolderInputBox Dim NewFldr NewFldr = InputBox("Name for New Folder?", Title, "New Folder") If NewFldr = "" Then Call Cleanup On Error Resume Next fso.CreateFolder fso.GetFolder(Args(0)) & "\" & NewFldr If Err.Number = 58 Then Err.Clear:On Error GoTo 0 ws.Popup Chr(34) & NewFldr & Chr(34) & " already exists.", ,Title, 0 + 48 + 4096 Call MakeNewFolderInputBox ElseIf Err.Number = 52 Then Err.Clear:On Error GoTo 0 ws.Popup Chr(34) & NewFldr & Chr(34) & " contains invalid character(s).", ,Title, 0 + 48 + 4096 Call MakeNewFolderInputBox End If ws.Run fso.GetFolder(Args(0)) & "\" & NewFldr Call Cleanup End Sub Sub Cleanup Set ws = Nothing Set fso = Nothing Set Args = Nothing Set clip = Nothing WScript.Quit End Sub
32 wscript.exe. W7 64 , 32 ( 64 ), WSH .Code:[HKEY_CLASSES_ROOT\Directory\Background\shell\NFC] @="New Folder from Clipboard" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Directory\Background\shell\NFC\command] @="C:\\Windows\\SysWOW64\\wscript.exe \"C:\\Users\\USER\\Documents\\My VBScripts\\mkdir.vbs\" \"%1\"" [HKEY_CLASSES_ROOT\Folder\shell\New Folder from Clipboard] [HKEY_CLASSES_ROOT\Folder\shell\New Folder from Clipboard\command] @="C:\\Windows\\SysWOW64\\wscript.exe \"C:\\Users\\USER\\Documents\\My VBScripts\\mkdir.vbs\" \"%1\""
:
1. , , - , (). , , ...? ...
: . .
2. - . / (folder tree) , / :
32 dll - . , 32 ...
cmd- . WSH .
[HKEY_CLASSES_ROOT\Directory\Background\s hell] ?Last edited by WoW; 30th December 2009 at 05:40.




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in