![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Delete (non doors) directory Topic Summary: Is there a way to delete a non doors directory from dxl? (for example c:/temp/) Created On: 1-Aug-2008 19:02 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Is there a way to delete a non doors directory from dxl? (for example c:/temp/)
|
|
![]() |
|
![]() |
|
Hi,
You can do it using the system function which allows you to send DOS commands. Something like: system("del c:\\temp") Look at system in the DXL help manual for notes on its use. Paul |
|
![]() |
|
![]() |
|
deleteFile(string filepath)
Check to make sure the filepath exists using Stat. Stat s = create(string filepath) if(!null(s)) { deleteFile(string filepath) } ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
the system method doesn't work. An error message pops up saying that creation of the process failed.
The other method using deleteFile doesn't work either...probably because it's used to delete files not directories. Edited: 4-Aug-2008 at 17:28 by Kane Grzebielski |
|
![]() |
|
![]() |
|
Following command will delete H:temp directory
system "cmd /c rmdir H:\\temp" -------------------------------------------- Either of these two command will delete a.txt from h drive. system("cmd /c del h:\\a.txt") deleteFile "h:\\A.TXT" None of the statement gives a dxl error message if the file/direcotry exists or doesn't exists. Edited: 4-Aug-2008 at 19:24 by ron lewis |
|
![]() |
|
![]() |
|
How do you handle the case where the directory name contains spaces? For example, if the directory to be deleted is C:\Temp\test for dir, and this directory further contains sub-directories, how do we delete them with a single command?
I tried system "cmd /c rmdir/S C:\\Temp\\test for dir" It thought test, for, dir are 3 separate directories and tried looking for those 3 directories. Thanks. Edited: 20-Oct-2008 at 00:22 by anant mitra |
|
![]() |
|
![]() |
|
Hi,
I think you need to add some extra quotes to your string. Try something like: system "cmd /c rmdir/S \"C:\\Temp\\test for dir\"" This translates to the command line prompt: cmd /c rmdir/S "C:\Temp\test for dir" Paul |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Delete (non doors) directory
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.