Re: How to Delete Files in Folder Which Don't Match Files in Another Folder
- From: "Davy" <david@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 5 Oct 2007 21:01:39 +0100
"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:up6aJbyBIHA.4176@xxxxxxxxxxxxxxxxxxxxxxx
Pegasus,
"Davy" <david@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:aNydnfM2-MOWcJjanZ2dneKdnZydnZ2d@xxxxxxxxxxxxxxxxx
My digital camera produces both a 'raw' and a jpg version of each image.
The
file names are identical except for the .raw and .jpg extensions.
I put all the .raw images in a 'RAW' folder and all the jpg images in a
JPG
folder. I browse the jpg folder quickly using Irfanview, deleting poor
images. Then I need to delete equivalent files in the RAW folder. This
action is error prone if I do it manually so I need a script.
I have a little experience of VBS scripting and would appreciate a
suggestion that might get me started.
I use VBS 6 in Windows 2000.
many thanks in advance,
Davy
You can do this with a single line batch file like so:
@echo off
for %%a in (d:\raw\*.raw) do if not exist d:\jpg\%%~na.jpg echo del %%a
Remove the word "echo" to activate the batch file.
thanks for that; works beautifully. Although does not work if the file name
has a space in it but this should not be a problem since the camera
generates file names without spaces,
thanks, Davy
.
- Follow-Ups:
- Re: How to Delete Files in Folder Which Don't Match Files in Another Folder
- From: Pegasus \(MVP\)
- Re: How to Delete Files in Folder Which Don't Match Files in Another Folder
- References:
- Prev by Date: Re: VBS in adodb doesn't work
- Next by Date: Re: How to Delete Files in Folder Which Don't Match Files in Another Folder
- Previous by thread: Re: How to Delete Files in Folder Which Don't Match Files in Another Folder
- Next by thread: Re: How to Delete Files in Folder Which Don't Match Files in Another Folder
- Index(es):
Relevant Pages
|