Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: dirremove 1028 log disk
if DirExist("%SourceDir%") FileDelete("%SourceDir%\*.*") DirRemove("%SourceDir%") Endifgives the error:
1028: LogDisk: Requested drive not online DirRemove("c:\win95\Start menu\Netwerk Programma's\Diverse applicaties\Multimedia")After the program is stopped (OK button clicked in Error STOP dialog) the directory is removed from my hard drive!?
What am I doing wrong, The DirExist checks if the Dir exists and FileDelete is deleting all the files in the dir so dirremove has to work.
This code is a part of a script that syncs two dirs, one on a network drive and on the local harddisk.
DirChange("C:\") Message(SourceDir,"Should NOT have a \ on the end for this code") if DirExist(SourceDir) FileDelete("%SourceDir%\*.*") DirRemove(SourceDir) EndifMy guess is that you were logged to the directory you were trying to delete. The Directory was removed, then WinBatch was lost as to where to be. The DirChange tell WinBatch to log to the C:\ directory. That will still be there so WinBatch will not be lost.
Article ID: W12935
Filename: 1028 Log Disk DirRemove Error.txt
File Created: 1999:04:15:16:50:38
Last Updated: 1999:04:15:16:50:38