[solved] Unable to remove/delete folder

Post Reply
Username
Posts: 262
Joined: 18 Feb 18 22:21

[solved] Unable to remove/delete folder

Post by Username » 03 Dec 18 5:28

Dont ask me how or why but after doing something I have a non-used Folder in PSU server which is off line and not reachable.
The name of it is TEST.JPG
I don't want it there, but even if I select Remove as admin it re-appears after relaunch of PSU.

How do I remove it for real? :)
Attachments
Please go away :)
Please go away :)
remove.png (92.99 KiB) Viewed 1181 times
Last edited by Username on 26 Dec 18 6:06, edited 1 time in total.
PSu Server 5 & Postgres 12 on macOS 10.14
PSO 5 on Windows Server 2016

- I'm the user

rdv4rjm
Posts: 95
Joined: 08 May 18 22:29

Re: Unable to remove/delete folder

Post by rdv4rjm » 18 Dec 18 9:35

Got same TEST.jpg file in FOLDER section
??

Hert
Posts: 6363
Joined: 13 Sep 03 7:24

Re: Unable to remove/delete folder

Post by Hert » 18 Dec 18 13:19

Can you try to run this script with Tools->Scripter?

Code: Select all

// start script
var
  ADs: TDBXOMClientDataSet;
begin
  ADs := PublicCatalog.NewDataSet;
  ADs.CommandText := 'update idFilePath ' +
                     'set FilePath = RootName ' +
                     'where GUID = (' +
                     '  select GUID ' +
                     '  from idfilepath ' +
                     '  where rootname like ''%TEST.JPG%'' ' +
                     ') ';
  ADs.Run;
  PublicCatalog.FreeDataset(ADs);

  Say('done');
end;
// end script
After that you should be able to delete it.
Does that help?
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

Username
Posts: 262
Joined: 18 Feb 18 22:21

Re: Unable to remove/delete folder

Post by Username » 26 Dec 18 6:06

Than you Hert.

Thats helped indeed.
Although PSu did not allow me to paste the script into the Scripter window.
I had a previously copied detection mask %FileName%*.*
in the memory and that was all PSu allowed me to paste. But I pasted it into Brackets and saved it as a .psc and then opened it with scripter and ran it.

After that I could remove the test.jpg
PSu Server 5 & Postgres 12 on macOS 10.14
PSO 5 on Windows Server 2016

- I'm the user

rdv4rjm
Posts: 95
Joined: 08 May 18 22:29

Re: [solved] Unable to remove/delete folder

Post by rdv4rjm » 26 Dec 18 22:53

Got same problem.
I applied the suggested script and got an error.
Using server Edition on Mac.

I lived with these up to now, but if they could disappear, It would look cleaner.
Attachments
Screen Shot 2018-12-26 at 4.49.10 PM.png
Screen Shot 2018-12-26 at 4.49.10 PM.png (9.44 KiB) Viewed 1053 times
Screen Shot 2018-12-26 at 4.48.49 PM.png
Screen Shot 2018-12-26 at 4.48.49 PM.png (49.85 KiB) Viewed 1053 times
Screen Shot 2018-12-26 at 4.48.32 PM.png
Screen Shot 2018-12-26 at 4.48.32 PM.png (119.53 KiB) Viewed 1053 times

Username
Posts: 262
Joined: 18 Feb 18 22:21

Re: [solved] Unable to remove/delete folder

Post by Username » 27 Dec 18 12:54

I believe you get the error because you have two TEST.JPG in the view.
Without doing too much, if you change the script and remove the last % for the mask %TEST.JPG%
That should only return one test folder.

And for the second run add the last % back again and the mask should allow the [wotk asset] to be deleted.

But Hert might have smoother way of doing it. :)
PSu Server 5 & Postgres 12 on macOS 10.14
PSO 5 on Windows Server 2016

- I'm the user

rdv4rjm
Posts: 95
Joined: 08 May 18 22:29

Re: [solved] Unable to remove/delete folder

Post by rdv4rjm » 31 Dec 18 16:59

Username

Tried script after removing last %
Ran script. It returned as DONE.
I deleted first test.jpg

reinserted % and tried again.

It returned same error.

I am still able to delete both files, but they show up again when relaunching PSU.

Thanks anyways.

If you got other ideas, they're welcome.

Post Reply