|
Answer» I am having a bit of trouble deleting a files and folders(with files in them) and the primary target folder with my batch code. The file structure and code is below.
Any help will be appreciated!
Thanks
Code: [Select]Tree structure is like this:
PrimaryFolder | Files FolderA | Files FolderB | FolderC | Files FolderD | Files Files
THE CODE That doesn't WORK!
Code: [Select]@echo off
regedit /s progx.reg call MindWS.exe regedit /s unProgx.reg
cd C:\Users\User1\Applic~1\Folder
FOR %%F IN (%*) DO ECHO Y| cacls %%F /T /C /G Administrators:F :Set proper attributes for directories FOR %%F IN (%*) DO attrib -h -s -r -a %%F /S /D :Set proper attributes for files FOR %%F IN (%*) DO attrib -h -s -r -a %1\*.* /S /D FOR %%F IN (%*) DO echo y|del C:\Users\User1\Applic~1\PrimaryFolder\*.*
rd C:\Users\User1\Applic~1\PrimaryFolderWell, thought I was GETTING somewhere with:
Code: [Select]deltree [path to folder]/folder /Y But system could not find deltree
So I moved on to:
Code: [Select]rd [path to folder]/folder /S /Q and had success.
Thanks for the help not yet GIVEN!
|