0
votes
0answers
31 views

How to execute batch script in windows right?

According this answer in How do I delete a folder which is nested quite deep and avoid “File name too long”?, I created 1.bat file with following source: @echo off if not (%1)==() cd %1 for /D %%i in ...
0
votes
0answers
23 views

In windows, filter and delete image based on dimension(or any search filters for that matter)

In windows explorer, I can filter a folder based on the dimension criteria, say: width:<800 height:<600 (so that I filter small images) height:>2000 (so that I filter portraits) and then delete ...
1
vote
2answers
176 views

CMD delete specific files and log all output

Hi guys ive written a script for a school im working at to automatically mount a folder as drive X: and then to go into drive X and recursively scan all folders and sub folders for .bat .cmd .exe and ...
2
votes
1answer
54 views

How do I delete symlinks from a Windows folder with a batch file/script?

How do I delete all symlinks and only all symlinks from a folder with a batch file/script? The folder is c:\wamp\www, and this is what I've tried: Content files delete.cmd for /f "delims=" %%D in ...
0
votes
1answer
579 views

How to create batch file that delete files by words at the end of file name (using a list of words)?

I have a directory with thousands of html files scattered across several subdirectories. I need to delete all files matching any one of many criteria. All criteria are similar by kind. The file names ...
0
votes
2answers
2k views

Batch command to delete files from file list [duplicate]

This code works fine. it deletes files from a file list: For /f %%a in (file.lst) do del %%a But why is the below one not working? It deletes the .lst file itself: if exist file.lst ( set ...
2
votes
3answers
2k views

Delete set of files using find command

Background Delete a set of files, scattered across different directories. Problem The following code does not work (the unescaped | causes issues); for %i in (dir /s/b | find "lock") do echo del ...
3
votes
1answer
332 views

Delete files from one folder if a similarly named file does not exist in another folder

I need to delete files from folder A if a file with the same name but different file type does not exist in folder B. For example: FOLDER A file1.gif file2.gif file3.gif file4.gif file5.gif ...
0
votes
1answer
188 views

Delete folders with a common string but with spaces in folder names

I have a bunch of folders, some with spaces in their folder names and some not. They all have a certain string common in their folder names and they all lie inside a single directory. For e.g new ...
3
votes
1answer
702 views

Windows Batch recursive delete old files

I'm looking for a function in batch that recursive delets all files/folders older than X Days from a given path. Is there a Fast and easy snippet that could be placed in a batch function?
2
votes
3answers
3k views

Make a batch file find duplicate file names with different extensions, and actions on the results

What I want to do is have a batch file search folders, and subfolders, for matching file names that are ending in .mp3 and .wma and delete or move the *.wma duplicates. Below you'll find what I have ...
2
votes
2answers
5k views

Batch delete : Access is denied

As the title suggests, I'm having issues with the del command in a batch file. When it gets to the delete step I get the message "Access is denied". My batch command looks something like this. set ...
3
votes
2answers
3k views

Delete duplicate files with Windows batch file

I have a program that automatically copies files to a directory, and if it creates a duplicate it will name it like so: file with duplicate.xxx file with duplicate - 1.xxx file with duplicate - 2.xxx ...
1
vote
3answers
275 views

How to Delete a file at a specified date

I want to delete a file (a .exe) from a folder, after a specified date, say 25/Feb/2010. How can I use scheduled tasks and batch files for this. I am not sure whether the code below work : @ECHO OFF ...
0
votes
1answer
260 views

Delete Protected WMA

I have several hundred protected WMA files that I don't want to keep, spread in a several level deep folder structure. Is there an easy way to detect these files and delete them? There are also ...