Hello,
in bash shell that would be something like [rm -rf /home/Sebastian/Desktop/folder( | [ggee/shell]
in ms-dos you can't specify a directory that is not relative to the patch (long story), a simple way would be about making a batch script with this inside:
cd c:\Users\Sebastian\Desktop rd %1
along with your patch
and then
[open yourBatchScript.bat folderToDelete( | [moonlib/popen]
or
[yourBatchScript.bat folderToDelete( | [motex/system]
Colet Patrice
----- Mail original -----
De: "Sebastian Valenzuela" svalenzuelamusic@gmail.com À: "Pure Data Forum" pd-list@iem.at Envoyé: Dimanche 27 Janvier 2013 22:25:48 Objet: [PD] Solution for deleting files via pd?
Hi list,
My Pd patch creates and saves new audio files to a designated folder on my desktop. I would like to have Pd delete these files every time I open my patch ([loadbang]).
I've heard the [shell] object is a possibility, but i'm not too keen on terminal commands or how they will pertain to [shell]...
Can anyone please give me an example of a command I would send to [shell] to delete all files within a specified folder on my desktop? If this isn't the best way to do it, is there another possibility through Pd?
Thank you for your time, Sebastian
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list