Re: Batch File Help
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
Olam wrote:
I still cannot get mine to work. This is what I have in my bat/cmd file
rmdir /S /Q "C:\Documents and Settings\Jeremy Johnston\Local
Settings\Temp\*.*"
I get the following error at the cmd prompt
The filename, directory name, or volume label syntax is incorrect.
At first I had it deleting all the files in the temp but it left all of the
sub directories. ???
Hi,
See tip 617 in the 'Tips & Tricks' at http://www.jsiinc.com/reghack.htm
DELTREE.BAT "c:\My Test Folder"
To delete files and sub directories under the temp folder:
DELTREE.BAT "%USERPROFILE%\Local Settings\Temp"
Deltree.bat contains:
@echo off
pushd %1
del /q *.*
for /f "Tokens=*" %%i in ('dir /B') do rd /s /q "%%i"
popd
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
.
Relevant Pages
- Re: cannot delete file: cannot read from the source file or disk
... Do not use the following characters in directory names or file names, ... > The filename, directory name, or volume label syntax is incorrect. ... (microsoft.public.windowsxp.general) - Re: cannot delete file: cannot read from the source file or disk
... >> Regards, Jim Byrd, MS-MVP ... >>> The filename, directory name, or volume label syntax is incorrect. ... (microsoft.public.windowsxp.general) - Re: Export by TransferText in macro error
... The filename, directory name, or volume label syntax is incorrect ... (microsoft.public.access.conversion) - Re: cannot delete file: cannot read from the source file or disk
... Copylock or Killbox and see if they'll do it for you. ... > The filename, directory name, or volume label syntax is incorrect. ... (microsoft.public.windowsxp.general) - Re: Firefox failure
... > (The filename, directory name, or volume label syntax is incorrect) ... > So I chopped the .class in the Applet tag, even though that is the way ... (comp.lang.java.programmer) |
|