KioskeaKioskeaCommentCaMarcheSign up, it's free !
Saturday May 17, 2008 - 5:18:25 am BST

Batch file help

Search : in
batch file help
par nareen123
 Threaded discussions
Statut :
Sunday April 20, 2008 12:25:29 PM
Hello,


I need some help with a batch file I need to write, I am trying to do the following. I need to find all the files in location a with a file size of 0KB and replace the text in those files with an error message saying something like "error when saving", it also needs to skip over .red files.

Thanks for any help,
Configuration: Windows XP
Internet Explorer 6.0
Reply to nareen123  Report this message to moderators Go to last message


  • This message seems useful, vote!
  • Report this message to moderators
By mano.mn2, on Sunday April 20, 2008 04:40:28 PM Threaded discussions 
Hai

Try this:

@echo off
for %%f in ("C:\location_A\*") do (
if /i not %%~xf == .red (
if %%~zf == 0 (
echo Error when saving>>"%%f"
)
)
)


Good luck.
Reply to mano.mn2
Currently no message on this subject
Reply
Message title :
Your nick:
Your E-mail :
Message: 
  •  
  •  
Options: Get the answers by mail.
 

Help