LeeGolding
asked on
VBScript to delete a list of files from sub directories
I need a VBScript to delete a list of paths and files from the current directory. The list of files is located on C:\files.txt. The current can be any directory. Every file in the list is in a sub directory of the current directory: File example:
copenhagen/hotels/images/4 .jpg
copenhagen/hotels/images/6 .jpg
copenhagen/hotels/images/7 .jpg
copenhagen/hotels/images/8 .jpg
copenhagen/hotels/images/9 .jpg
copenhagen/hotels/images/b reakfast_r oom_icon.g if
copenhagen/hotels/images/i ndex_clip_ image002.j pg
copenhagen/hotels/images/i ndex_clip_ image003.j pg
copenhagen/hotels/images/i ndex_clip_ image004.j pg
copenhagen/hotels/images/i ndex_clip_ image006.g if
copenhagen/hotels/images/i ndex_clip_ image006_0 000.gif
copenhagen/hotels/images/i ndex_clip_ image006_0 001.gif
copenhagen/hotels/images/i ndex_clip_ image006_0 002.gif
copenhagen/hotels/images/i ndex_clip_ image006_0 003.gif
copenhagen/hotels/images/i ndex_clip_ image006_0 004.gif
copenhagen/hotels/images/i ndex_clip_ image006_0 005.gif
copenhagen/hotels/images/i ndex_clip_ image007.g if
copenhagen/hotels/images/i ndex_clip_ image007_0 000.gif
copenhagen/hotels/images/i ndex_clip_ image007_0 001.gif
copenhagen/hotels/images/i ndex_clip_ image007_0 002.gif
copenhagen/hotels/images/i ndex_clip_ image007_0 003.gif
copenhagen/hotels/images/i ndex_clip_ image007_0 004.gif
copenhagen/hotels/images/i ndex_clip_ image007_0 005.gif
copenhagen/hotels/images/i ndex_clip_ image007_0 006.gif
copenhagen/hotels/images/i ndex_clip_ image008.g if
copenhagen/hotels/images/i ndex_clip_ image008_0 000.gif
copenhagen/hotels/images/i ndex_clip_ image008_0 001.gif
copenhagen/hotels/images/i ndex_clip_ image008_0 002.gif
copenhagen/hotels/images/i ndex_clip_ image008_0 003.gif
copenhagen/hotels/images/i ndex_clip_ image008_0 004.gif
copenhagen/hotels/images/i ndex_clip_ image008_0 005.gif
copenhagen/hotels/images/i ndex_clip_ image010.j pg
copenhagen/hotels/images/i ndex_clip_ image011.j pg
copenhagen/hotels/images/i ndex_clip_ image012.j pg
copenhagen/hotels/images/i ndex_clip_ image013.g if
copenhagen/hotels/images/i ndex_clip_ image013_0 000.gif
copenhagen/hotels/images/i ndex_clip_ image013_0 001.gif
copenhagen/hotels/images/i ndex_clip_ image013_0 002.gif
copenhagen/hotels/images/i ndex_clip_ image014.g if
copenhagen/hotels/images/i ndex_clip_ image014_0 000.gif
copenhagen/hotels/images/i ndex_clip_ image014_0 001.gif
copenhagen/hotels/images/i ndex_clip_ image014_0 002.gif
copenhagen/hotels/images/i ndex_clip_ image016.j pg
copenhagen/hotels/images/i ndex_clip_ image017.j pg
copenhagen/hotels/images/i ndex_clip_ image018.j pg
copenhagen/hotels/images/i ndex_clip_ image019.g if
copenhagen/hotels/images/i ndex_clip_ image020.j pg
copenhagen/hotels/images/i ndex_clip_ image021.j pg
copenhagen/hotels/images/i ndex_clip_ image022.j pg
copenhagen/hotels/images/i ndex_clip_ image023.j pg
copenhagen/hotels/images/i ndex_clip_ image025.j pg
copenhagen/hotels/images/i ndex_clip_ image026.j pg
copenhagen/hotels/images/i ndex_clip_ image027.j pg
copenhagen/hotels/images/i ndex_clip_ image029.j pg
copenhagen/hotels/images/i ndex_clip_ image030.j pg
copenhagen/hotels/images/i ndex_clip_ image031.j pg
copenhagen/hotels/images/i ndex_clip_ image032.g if
copenhagen/hotels/images/i ndex_clip_ image034.j pg
copenhagen/hotels/images/i ndex_clip_ image035.j pg
copenhagen/hotels/images/i ndex_clip_ image036.j pg
copenhagen/hotels/images/i ndex_clip_ image037.g if
copenhagen/hotels/images/i ndex_clip_ image037_0 000.gif
copenhagen/hotels/images/i ndex_clip_ image039.j pg
copenhagen/hotels/images/i ndex_clip_ image040.j pg
copenhagen/hotels/images/i ndex_clip_ image041.j pg
copenhagen/hotels/images/l ift_icon.g if
Yes I am deleting certain orphaned files from a website :-D
Thanks,
Lee.
copenhagen/hotels/images/4
copenhagen/hotels/images/6
copenhagen/hotels/images/7
copenhagen/hotels/images/8
copenhagen/hotels/images/9
copenhagen/hotels/images/b
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/i
copenhagen/hotels/images/l
Yes I am deleting certain orphaned files from a website :-D
Thanks,
Lee.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No problem :)
Chris
ASKER
Thanks :-D
Lee.