Multi Commander > Support and Feedback

Can't get MC.Filesystem.Delete to work

<< < (2/4) > >>

Ulfhednar:
Thanks for trying to make this function work Mathias.
I have just attempted to use this command.
I get Failed to volume item whenever I use it.
I've tried :-

--- Code: ---MC.Filesystem.Delete USE_CURRENT_SOURCEITEM FILTER="*.zip; *.rar"
MC.Filesystem.Delete USE_CURRENT_SOURCEITEM "*.zip; *.rar"
MC.Filesystem.Delete USE_CURRENT_SOURCEITEM="*.zip; *.rar"
--- End code ---

It does appear to try to action the command, but even with files selected doesn't like something & always gives that error.  ???

Mathias (Author):

--- Quote from: Ulfhednar on July 30, 2022, 13:13:03 ---Thanks for trying to make this function work Mathias.
I have just attempted to use this command.
I get Failed to volume item whenever I use it.
I've tried :-

--- Code: ---MC.Filesystem.Delete USE_CURRENT_SOURCEITEM FILTER="*.zip; *.rar"
MC.Filesystem.Delete USE_CURRENT_SOURCEITEM "*.zip; *.rar"
MC.Filesystem.Delete USE_CURRENT_SOURCEITEM="*.zip; *.rar"
--- End code ---

It does appear to try to action the command, but even with files selected doesn't like something & always gives that error.  ???

--- End quote ---

It is the first alternative. filter must be set to the "FILTER" option and the item in focus must be a folder.
Where is the files located ? normal harddrive ?  or a virtual path ?

Mathias (Author):

--- Quote from: Ulfhednar on July 30, 2022, 13:13:03 ---Thanks for trying to make this function work Mathias.
I have just attempted to use this command.
I get Failed to volume item whenever I use it.
I've tried :-

--- Code: ---MC.Filesystem.Delete USE_CURRENT_SOURCEITEM FILTER="*.zip; *.rar"
MC.Filesystem.Delete USE_CURRENT_SOURCEITEM "*.zip; *.rar"
MC.Filesystem.Delete USE_CURRENT_SOURCEITEM="*.zip; *.rar"
--- End code ---

It does appear to try to action the command, but even with files selected doesn't like something & always gives that error.  ???

--- End quote ---

I have this

E:\Test\Test and in that folder I have

testfile.png
testfile.rar
testfile.zip

I'm showing the content of E:\test and focus in on 'test' folder ( E:\test\test )

I run the command
and it deleted all files in text except the *.png file.

Ulfhednar:
Well thanks for the fun Mathias!  ;)
You got me twice,
1. because I was using the earlier release without the updated function
2. it killed <20 files it found in the directory above the focused one.

No problem as I was able to recover them.  Only lost a zip with all my crypto-currency addresses, but what's $1.6m between friends....   ;D  :P
 ...A few more tests will be needed I think!

Mathias (Author):

--- Quote from: Ulfhednar on July 30, 2022, 16:03:22 ---Well thanks for the fun Mathias!  ;)
You got me twice,
1. because I was using the earlier release without the updated function
2. it killed <20 files it found in the directory above the focused one.

No problem as I was able to recover them.  Only lost a zip with all my crypto-currency addresses, but what's $1.6m between friends....   ;D  :P
 ...A few more tests will be needed I think!

--- End quote ---

1. first version was missing some logging that was not included in the release. I also improved how it handled filters and if the path is pointing to file instead and folder..

2. USE_CURRENT_SOURCEITEM take the item that are in focus from the panel that are in focus (source panel). but it is important that the correct panel is active.. so it picks correct.
it should not pick a folder above.. it picks the one that is on focus. that the line marker is on..

Hmm Might be to dangerous function to allow delete so easy. Maybe should require a confirmation box. ?  maybe a "Do you really want to delete : <folder> ?" box ?, but the idea with script it to not have them..


Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version