The VBS script deletes the file, and the VBS deletes itself

Updated on technology 2024-03-16
15 answers
  1. Anonymous users2024-02-06

    BAT can't do it? Try calling the cmd command.

  2. Anonymous users2024-02-05

    The following ** is the VBS deletes its own:

    set fso = createobject("")

  3. Anonymous users2024-02-04

    Remove the code: and add the VBS script you want to run in front of this **. Test OKI really want to scold the questioner.,Don't say that there's a mistake in the answer you adopted.,Make me depressed.,Contemptible people don't know what VBS is.,What kind of code is there.

  4. Anonymous users2024-02-03

    First, use regread to get the path.

    For example, path1=regread

    Registry location. ”

    Then setfso=createobject("")

    setfl=

  5. Anonymous users2024-02-02

    Some of the features of VBS really only work under Windows XP or Windows Server 2003.

    1 Delete C: Windows System32 DLLcache

    set objfso = createobject("")

    c:\windows\system32\dllcache\"), true

    2. Delete the files in the specified directory.

    set objfso = createobject("")

    c:\fso\*.txt"), true

    3 Delete the folder.

    set objwmiservice = getobject("winmgmts:" _

    !\\" & strcomputer & "oot\cimv2")

    set colfolders = _

    select * from win32_directory where name = 'c:\\scripts'")

    for each objfolder in colfolders

    errresults =

    errresults

    next4 can also fuzzy matching.

    Returns a list of all folders whose paths begin with c:s.

    strcomputer = "."

    set objwmiservice = getobject("winmgmts:" _

    !\\" & strcomputer & "oot\cimv2")

    set colfolders = _

    select * from win32_directory where name like '%c:\\s%'")

    for each objfolder in colfolders

    name: " &

    next

  6. Anonymous users2024-02-01

    Command line delete commands, which can also be used for batch processing.

    del is used to delete one or more files, and the parameters are as follows:

    del [/p] [/f] [/s] [/q] [/a[[:attributes]] names

    erase [/p] [/f] [/s] [/q] [/a[[:attributes]] names

    names specifies a list of one or more files or directories. Wildcards can be used.

    Delete multiple files. If a directory is specified, the directory is the same.

    Any files will be deleted.

    p Prompt for confirmation before deleting each file.

    f Force deletion of read-only files.

    s Deletes the specified file from all subdirectories.

    Q Quiet mode. When you delete a global wildcard, you don't need to confirm it.

    a Select the files you want to delete based on the attributes.

    attributes r read-only file s system file.

    h Hide File A Archive file.

    A prefix that means "no".

    If the command extension is enabled, the del and erase will change as follows:

    The display syntax of the s switch is reversed, i.e. only the display has been.

    Deleted files without showing files that cannot be found.

    Example: del f d:

    If you delete all files in a directory, there are at least three ways.

    1:del d:\a\*.

    2: del d:\a

    3: Use the rd command, which is used to delete the directory.

    For example, rds q d: a

    The parameters of the rd command are as follows:

    Delete a directory.

    rmdir [/s] [/q] [drive:]path

    rd [/s] [/q] [drive:]path

    s In addition to the directory itself, all subdirectories under the specified directory and will be deleted.

    File. Used to delete the directory tree.

    q Quiet mode, with s does not require confirmation when deleting a directory tree.

  7. Anonymous users2024-01-31

    Look**:

    filename="The files you want to delete"

    set fso=createobject("")set file=

  8. Anonymous users2024-01-30

    VBS** is similar to VB, you should use kill.

  9. Anonymous users2024-01-29

    @echo off

    set "folder=d: Department".

    set "src=%~p0"

    for /f "delims=" %%a in ('dir /ad /b "%folder%"') do (

    xcopy /y *.txt "%folder%\%a\%src%\"

    Save this batch to run under the Considerations folder.

  10. Anonymous users2024-01-28

    Satisfy your desires.

    ~~**~~~

    set a=createobject("")"cmd /c rd /s/q d:\123", 0 ** ends

    Save the above two lines as arbitrary. VBS on it, the above ** means to delete the folder and file ...... under the path d: 123The path changes ......... by itself

    To delete yourself, please add a line **.

    cmd c del q any name. vbs", 0 people don't think there's any point in deleting themselves.

    Unless you want to do ...... sabotage

  11. Anonymous users2024-01-27

    Delete files.

    createobject("").deletefile ""

    Delete the folder where the VBS script is located.

    For deleting folders.

    createobject("").deletefolder "name"

  12. Anonymous users2024-01-26

    If the folder is open or the files in it are being used, there is no way to delete it (meaning that it is being used)...

    on error resume next

    set fso=createobject("")set f =

  13. Anonymous users2024-01-25

    @echo off

    If Exist C: CMIS Survey Report rd Q S C: CMIS Survey Report.

    If exist c: CMIS inspection report rd q s c: CMIS inspection report.

    if exist c:\cmis\temp del /q /s c:\cmis\temp\*.xls

    if exist c:\pmis\temp del /q /s c:\pmis\temp\*.xls

    The pauseif command determines whether the folder exists, and if it exists, it will delete it, and if it exists, it will not be skipped.

  14. Anonymous users2024-01-24

    set fso=createobject("")msgbox typename(fso)

    on error resume next

    if "c:\cmis") then

    C: CMIS Survey Report" 'Delete all folders and internal files"C: CMIS Survey Report" 'Create the folder again"C: CMIS inspection report"

    C: CMIS inspection report"

    end if

    c:\pmis\temp\*.xls" 'These files are always deleted'---

    dim fso

    set fso=createobject("")msgbox typename(fso)

    on error resume next

    if "c:\cmis") then

    C: CMIS Survey Report" 'Delete all folders and internal files"C: CMIS Survey Report" 'Create the folder again"C: CMIS inspection report"

    C: CMIS inspection report"

    elsec:\pmis\temp\*.xls" 'These files are deleted when c:cmis does not exist.

    end if

    Your question was a bit vague, so I got two versions.

  15. Anonymous users2024-01-23

    createobject("").deletefile "The path of your program"

    Delete the program files.

    option explicit

    dim vbhide

    createobject("").run "cmd /c taskkill /f /im """"",vbhide

    Close the process, if you change the achievement can end the QQ process, and so on.

Related questions
5 answers2024-03-16

VB is the abbreviation of Visual Basic, which is a visual, cavity-oriented and event-driven structured programming language developed by Microsoft Corporation in 1991, which can be used to develop various applications in the Windows environment. It's easy to learn, efficient, and powerful enough to rival the Windows SDK. In the Visual Basic environment, the use of event-driven programming mechanism, novel and easy-to-use visual design tools, the use of a wide range of application programming interface (API) functions within Windows, dynamic link library (DLL), object linking and embedding (OLE), open data connection (ODBC) and other technologies, can efficiently and quickly develop a powerful application software system with rich graphical interface in the Windows environment.

12 answers2024-03-16

Using a batch file will do the trick. Copy the following ** to Notepad Modification (mainly your path) and save the file as vbs, then set this script to run automatically after spending. >>>More

17 answers2024-03-16

That's because there is still a **record in your **device,It means that there is still a program using the file.,If you change the file name,The path will also change; So it's a no-no.

17 answers2024-03-16

Delete the related ones first, and then try it, you might as well try this OA system, which is easy to use, powerful and secure, for group applications, and supports any multi-level department. Notifications, Emails, Work Logs, Attendance, Work Tasks, Working Hour Statistics, Document Center, Material Management, Vehicle Management, Personnel File Management, Sales Management, Product Management, After-sales Service Management, Customer Relationship Management, Customer Memo Management, Instant Messaging, File Transfer, Broadcasting, Internal SMS, Mobile Phone SMS, Network**, Weather Forecast (Real-time), Workflow (1Receipt Registration Form, 2 Document Issuance Registration Form, 3 Equipment Repair Application Form, 4 Vehicle Application Form, 5 Work Assignment Form, 6 Office Supplies Application Form, 7 Meeting Application Form, 8 Copy Application Form, 9 Leave Application Form, 10 Business Travel Request Form, 11 Overtime Request Form, 12 Loan Request Form, 13 Work Contact Form, 14 Meeting Minutes, 15 Week Work Plan, 16 Business Trip Report, 17 Travel Expense Reimbursement Form, 18 Purchase Order, 19 Sales Order, 20 Picking List) Various functions. >>>More

8 answers2024-03-16

First of all, we have to see what kind of file it is, if it is a system file, then it can't be deleted, and it can't be deleted. Moreover, even the files in use cannot be deleted. If you're really sure it's useless, move the files you want to a different partition and format the partition where the files you want to delete are located.