Code Comments
Programming Forum and web based access to our favorite programming groups.I'd like to either delete or rename directories as part of my picture site creating program. You can't rename, as you can't tie to a directory. And the []rmdir only works on empty directories. These never are. I could use []cmd and issue DOS commands. But are there some more elegant APIs that I can use? Don <www.donwiss.com> (e-mail link at home page bottom).
Post Follow-up to this messageDon Wiss wrote: > I'd like to either delete or rename directories as part of my picture site > creating program. You can't rename, as you can't tie to a directory. And > the []rmdir only works on empty directories. These never are. I could use > []cmd and issue DOS commands. But are there some more elegant APIs that I > can use? > > Don <www.donwiss.com> (e-mail link at home page bottom). Use the MoveFile API call. #wcall 'MoveFile' ('c:\path\OldDirName',#tcnul) ('c:\path\NewDirName',#tcnul ) MoveFile should be defined in the ADF file. If not, it is: MoveFile=B(*C lpExistingFileName, *C lpNewFileName) ALIAS MoveFileA LIB Kern el32 .qed
Post Follow-up to this messageTo delete a folder (empty or not) try:
[]wself{comes from}'fso' []wi 'Create' 'Scripting.FileSystemObject'
[]wi 'XDeleteFolder' 'c:\New Folder'
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.