Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
lucamennoia
- Posts: 2
- Joined: 11 Feb 2015 16:52
#1
Post
by lucamennoia » 11 Feb 2015 17:08
I have this folder structure:
Code: Select all
MainFolder\
Folder1\SubFolder1\
Folder2\SubFolder2\
Folder3\SubFolder3\
...
...
...
Folder1000\SubFolder1000\
TargetFolder\
I need batch commands:
1) to delete all .url and .txt files from each subfolder (from SubFolder1, from Subfolder2, etc.)
2) to move all "SubFolders" (each one with its remaining files) to the "TargetFolder" with a batch command.
I know i should use FOR commands and i tried but i only messed everything. I have no idea of how to do it...please help!
-
Squashman
- Expert
- Posts: 4486
- Joined: 23 Dec 2011 13:59
#2
Post
by Squashman » 11 Feb 2015 17:22
So the output should be......
TargetFolder\Folder1\SubFolder1
or
TargetFolder\SubFolder1
-
lucamennoia
- Posts: 2
- Joined: 11 Feb 2015 16:52
#3
Post
by lucamennoia » 14 Feb 2015 08:31
The output should be:
TargetFolder\SubFolder1
TargetFolder\SubFolder2
...
...
...
TargetFolder\SubFolder1000