deleting folders

Home Forums Scripting DOS Command Shell deleting folders

Viewing 1 post (of 1 total)
  • Author
    Posts

  • shmengie
    Member
    #151208

    okay, this has to be the simplest thing ever, yet, it eludes me.

    i have a scheduled task that runs once a week which calls a batch file. the batch file has the line:del v:*.* /s /q[/CODE]where v is a mapped share.

    this runs perfectly, except, it leaves behind all my empty folders and their subs. i suppose i could add a line like[CODE]rd *.*[/CODE] but after googling, i don’t think rd supports wildcards.

    i found some wsh solutions, but that sure seems to be beyond the scope of just having the del *.* command do what i want. like i said, this has to be the simplest thing ever. apparently, though, not as simple as me!

    tia[CODE]del v:*.* /s /q[/CODE]where v is a mapped share.

    this runs perfectly, except, it leaves behind all my empty folders and their subs. i suppose i could add a line likerd *.*[/CODE] but after googling, i don’t think rd supports wildcards.

    i found some wsh solutions, but that sure seems to be beyond the scope of just having the del *.* command do what i want. like i said, this has to be the simplest thing ever. apparently, though, not as simple as me!

    tia[CODE]rd *.*[/CODE] but after googling, i don’t think rd supports wildcards.

    i found some wsh solutions, but that sure seems to be beyond the scope of just having the del *.* command do what i want. like i said, this has to be the simplest thing ever. apparently, though, not as simple as me!

    tia

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Don't leave your business open to attack! Come learn how to protect your AD in this FREE masterclass!REGISTER NOW - Thursday, December 2, 2021 @ 1 pm ET

Active Directory (AD) is leveraged by over 90% of enterprises worldwide as the authentication and authorization hub of their IT infrastructure—but its inherent complexity leaves it prone to misconfigurations that can allow attackers to slip into your network and wreak havoc. 

Join this session with Microsoft MVP and MCT Sander Berkouwer, who will explore:

  • Whether you should upgrade your domain controllers to Windows Server
    2019 and beyond
  • Achieving mission impossible: updating DCs within 48 hours
  • How to disable legacy protocols and outdated compatibility options in
    Active Directory

Sponsored by: