All the code/commands below are part of a PHP script that processes images from the command line, it is for a Linux system, I need to figure out how to translate these commands to work on a Windows system.
I thought about possibly switching it to use the native PHP filesystem functions but I am not sure because of things like -rf and -f that are in these commands below.
Could someone please help me, I need the 5 below translated to work in a PHP script on a Windows system instead of Unix/linux
line 100
exec("rm -rf {$this->tmp_path}");
line 219
exec("rm -f $raw_file");
line 281
exec("mv $quant_file {$this->tmp_path}/{$src_filename}-quant.png");
line 289
exec("rm -f $quant_file");
line 295
exec("rm -f $out_file");
rm -rf→rd /s /qrm -f→del /fmv→moveOf course, if you want your script to work on both Windows and Unix, then you have some more work to do. But the PHP native functions (
rmdir,unlinkandrename) are trivial to use in this case, actually:(Roughly, it’s untested and I haven’t touched PHP in half a decade.)