Re: batch file command?

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi,

This was changed late in DOS days. You must use -y and not /y in this case.
If you leave *.* -y you will get a prompt that asks you if you are sure...
Microsoft changed these options since it was considered dangerous (e.g. any
virus could come and remove all files from the drive)...

What you can still use is e.g.

del *.log -y (and not /y). In this case the command will remove all files
named *.log

You can use another type of script (e.g. VBS script) that will remove all
files in the folder... Such script can be found here...

Delete All Files in a Folder
http://www.microsoft.com/technet/scriptcenter/scripts/storage/files/stfivb06.mspx

Change the path in the script "C:\FSO\*.txt" to e.g.
C:\WINDOWS\system32\NtmsData\*.*

I hope this helps,

--
Mike
Microsoft MVP - Windows Security


"alex" <alex@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0954E764-2FD5-4242-ACA9-B6B2485411FF@xxxxxxxxxxxxxxxx
>I have this in a batch file del C:\WINDOWS\system32\NtmsData\*.* /y the /y
>is
> suppose to answer yes to the question but doesn't. why?


.



Relevant Pages

  • Re: User account and Personal folder mismatch script
    ... I believe you want a script that can be run by an administrator that will ... The script above only documents if a home folder has been assigned. ... > End Sub ...
    (microsoft.public.scripting.vbscript)
  • Re: Need help with simple move script?
    ... DOS than all of us with the VB so far though. ... McKirahan a log file would be WONDERFUL and is in my DOS script. ... another 'backup folder', Compress that folder, then move that compressed file ... So far we've got the compression to work but not the move. ...
    (microsoft.public.scripting.vbscript)
  • Input on CleanUp script
    ... Since I'm going to be using this script in a production environment, ... If the script is used with a backup folder ... var strTargetFolder, strBackupFolder, args0, args1, args2, noArgs; ...
    (microsoft.public.scripting.wsh)
  • Input on CleanUp script
    ... Since I'm going to be using this script in a production environment, ... If the script is used with a backup folder ... var strTargetFolder, strBackupFolder, args0, args1, args2, noArgs; ...
    (microsoft.public.scripting.jscript)
  • Re: Disappearing Links
    ... I believe someone has a script for rebuilding links but I'm unable to find it at the moment. ... It could be adapted to trawl through the whole mail folder tree - if you really need that, ... -- to any contacts in the address book that match the sender of the messages ... set theSelection to selection ...
    (microsoft.public.mac.office.entourage)