Delete all DOS file in a subdirectory (OpenInsight 32-Bit)
At 17 NOV 2003 11:58:41AM Rudhy B wrote:
I want to delete all DOS files in a subdirectory.
In Arev, I used:
PCPERFORM "ECHO Y|DEL G:\TEMP\*.* ]NUL"
What would be the equivalent method in OI ?
I already try:
OSDelete "G:\TEMP\*.*" but it didn't work.
There are hundreds of small DOS files in that directory, so deleting 1 file at a time takes too much time.
Thanks,
Rudhy
At 17 NOV 2003 11:58AM Jim Eagan wrote:
You could also make a .BAT file like TEMPDEL.BAT contaning your commands (del c:\temp\*.* and whatever else) then
Call Runwin ("UTILITY", "C:\TEMPDEL.BAT").
That's a bit more like what you were doing.
At 17 NOV 2003 11:58AM Steve Smith wrote:
errr…all DOS does inside a del *.* is delete files one at a time!
Use DIRLIST, and write your loop, use OSDELETE, and Bob's your mother's brother.
Steve
At 17 NOV 2003 11:58AM Steve Smith wrote:
You may also be able to prototype the SHFileOperation function in shell32.dll
This enables you to copy, delete, rename, delete to Trash, delete without confirmation, delete a whole path, and optionally display the progress indicator (as in a Windows deletion/copy) or perform the operation silently without display.
Steve
At 17 NOV 2003 11:58AM Rudhy B wrote:
Thanks. I'll stick with the DirList and loop each file. Easier to code :)
Rudhy