10-30-2006 05:46 AM
10-30-2006 06:44 AM
You could try something along the following lines:
system ("rmdir /S /Q dir_tree_to_remove");
JR
10-31-2006 09:16 AM
C:\> cmd.exe /C rmdir /S /Q c:\test
To use this MS-DOS command from a CVI program, use the following line in your code:
status = LaunchExecutableEx ("cmd.exe /C rmdir /S /Q C:\\test", LE_HIDE, NULL);
Whereby "test" is the direcory
I hope this helps!
Kirtesh Mistry
Applications Engineer
NI UK & Ireland
11-05-2006 02:00 AM
11-06-2006 09:22 AM
11-06-2006 03:29 PM
You would have do exactly the same: system and LaunchExecutable are present in CVI from several version on, so you could find them in the version of the IDE compatible with Win9x. rmdir is a system command that if I'm not wrong is present from DOS 5 or so...
@Stu_B wrote:
Thanks, I got it working now! Well in XP anyway not sure what it would do in win98.
01-15-2007 04:46 AM
Hello all,
I'm trying to do the same thing. Problem is: when the directory I would like to remove is in the Program Files folder, the My Documents folder, or any other folder containging a space character, the cmd.exe doesn't understand the command. Seems like it cannot handle directory names with spaces...
01-15-2007 05:06 AM - edited 01-15-2007 05:06 AM
If you surround the directory path name which contains spaces with quotes, this should still work. Do you have the correct file permissions to alter the Program Files structure? - IIRC this is protected and needs administrator rights to manipulate.
JR
Message Edited by jr_2005 on 01-15-2007 11:08 AM
01-15-2007 05:27 AM