sams teach Yourself windows Script Host in 21 Days phần 6

WSH cung cấp các khả năng cho bạn để tạo ra và thao tác các biến trong kịch bản của bạn. Không giống như các file batch, các biến được hạn chế vì vậy họ chỉ có sẵn trong một kịch bản duy nhất trong quá trình thực hiện của kịch bản. Đây là một lợi thế lớn hơn các tập tin hàng loạt, bị hạn chế sử dụng các biến môi trường chia sẻ, | DSimpoPDF Merge and Split Unregistered Version - http Set filesys Iterate through the arguments create folders For Each sFolderPath In sFolderPath If 0 Then The folder _ sFolderPath was created successfully. Else An error occurred while _ creating the folder sFolderPath End If Next This script differs from the previous script because it takes multiple command-line arguments. A loop iterates through the arguments and creates directories accordingly. Let s take a quick look at the effects of running the script. The before picture is illustrated in Figure . Figure Directories before running the script. If you run the script using the command line makfldr H ROOT H ROOT BIN H ROOT SRC H ROOT HELP H ROOT HELP ADMIN you ll see the output illustrated in Figure and if you go back to the Windows Explorer you ll see something that looks like Figure . Figure Output of the script. - http Figure Directories after running the script. Deleting a Folder Deleting a folder is just as simple as the preceding examples. Listing uses the method instead of FolderExists orCreateFolder . Listing Code to Delete Folder s FILE DESC This script demonstrates how you can use VBScript to delete a folder. AUTH Thomas L. Fredell DATE 12 9 1998 Copyright 1998 Macmillan Publishing OS impoPDFMerge-and Split Unregistered Version - http Check arguments show usage if necessary If 1 Then USAGE folder1 . folderN This allows you to delete one or more folders. 1 End If Create a .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
322    84    1    29-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.