Page 1 of 1

Posted: 25 Jun 2008, 11:07
by cmodica
Is it possible to delete all files in a specific folder with the 'Shell Command' Module ?

If Yes, How ?

Thank you.

Posted: 25 Jun 2008, 11:34
by senso
enter the command

Code: Select all

del C:"my folder"*.* /Q
in the command line?

Posted: 25 Jun 2008, 11:42
by bsork
Personally, I create .CMD files that I call from the shell module, but that's just me. As long as there's only one command needed, you should be able to do everything that's possible from the command line in Windows from within Usine also.

Try the del command with <drive><path><filename.extension>; eg

Code: Select all

"del C&#58;tempaudio*.*".
or

Code: Select all

"del C&#58;tempaudio*.* /F /Q".
The /F and /Q switches forces deletion of read-only files, and "quiet mode" (no prompting for confirmation using global wildcard *.*) respectively.

I'm not totally sure whether the switches may differ between languages (but I don't think so). In case you have a non-English Window installation, have a look at the options for the del command by entering cmd in the Start/Run dialog box, and at the prompt in the command window that should pop up, type "del /?" which lists the available switches.

[EDIT]: Senso beat me to it, aaarrgghhh!!! ;)

Posted: 25 Jun 2008, 13:30
by cmodica
OK. Thank you very much, but that is what i tried to do, but nothing happens !!

This is the code that i wrote in the command line of Shell Module
code :

del D:Audio ProdUsine RecordEssai 1*.* /Q
But nothing is deleting ....

Posted: 25 Jun 2008, 13:48
by senso
don't forget quotes (") especially if your path contains space characters.
try
code :

del D:"Audio Prod""Usine Record""Essai 1"*.* /Q
TO BSORK: the DOS language is universal and the syntax is is the same whatever the country.

Posted: 25 Jun 2008, 14:13
by cmodica
It is OK if i create a '.cmd' file, but it don't delete the file if i write the command in the command line of the shell module.

So i made a 'del.cmd' file with the code :
del "D:Audio ProdUsine RecordEssai 1*.*" /Q
and i call the del.cmd in the command line of the shell module
D:Audio Prodcommanddel.cmd
Like that everythink is ok.

Thank you.