8 Feb 18:21
menu item for deleting directory with all its content
Gilbert Ritschard <Gilbert.Ritschard <at> unige.ch>
2012-02-08 17:21:17 GMT
2012-02-08 17:21:17 GMT
Hello everybody,
I would like to add a menu item for deleting a directory with all its
content and subfolders (namely the Cache_ directory created by CacheSweave).
RemoveDirectory(folder) only works for an empty folder and is not
applicable.
I tried to add the following in MainMenu.ini and cannot figure out while
it does not work.
ITEM="Delete_cache"
CAPTION="Delete Cache_"
IMAGE="Delete"
MACRO="WinExe('','rd /Q /S Cache_','%P','Deleting Cache_');"
SAVE_INPUT=1
REQ_FILTER="%P\%N.Rnw"
The command line "rd /Q /S Cache_" makes the expected job in the Command
window.
Any hint would be welcome.
Cheers.
Gilbert
PS: I am using WinEdt 6 Build: 20110315 (v. 6.0)
You should either write a batch file containing the command
rd /Q /S Cache_
and execute it with WinExe or Run macro from WinEdt. Or else change
the definition to (something like):
MACRO="WinExe('','cmd.exe /C rd /Q /S Cache_','%P','Deleting Cache_');"
RSS Feed