Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What you are trying to do can be a little dangerous. The safest approach
might be to create a small .bat file, say dangerous.bat, and fully test it. Then use SHELL to run the bat file: Sub Macro1() x = Shell("cmd.exe /c C:\belfry\dangerous.bat", 1) End Sub The danger is that if anything goes wrong with the CD commands in the bat file, really bad things can happen. -- Gary's Student "Edd" wrote: Hi Experts: I want to be able to delete the contents of a directory (or remove and recreate the same directory). What is the best way to do that? (My first thought is via a DOS shell using its commands, but I no not how plus there has to be a better way.) After I delete the contents of this directory, using data from a colum of a spreadsheet, I would like to create a text file and copy that file to that directory (the whose contents was deleted). Your help is appreciated, please. Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reading Contents of a Directory | Excel Programming | |||
List the contents of a directory | Excel Programming | |||
Directory contents | Excel Programming | |||
Directory Contents | Excel Programming | |||
macro to move contents of directory | Excel Programming |