Delete Directory

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
hermhart
Posts: 234
Joined: 13 Jan 2015 18:41
Location: Windows 11; 100% scaling

Delete Directory

Post by hermhart »

I think I am missing something really simple, but I don't know what. Shouldn't the following work to delete the directory called "_Exports" that is on my desktop in the sub-directory of "test"?

delete 0,0, "%desktop%\test\_Exports";

XY 27.00.0400
Windows 11 64-bit

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Delete Directory

Post by highend »

Not if it is in %commondesktop% / %desktopreal%...
One of my scripts helped you out? Please donate via Paypal

hermhart
Posts: 234
Joined: 13 Jan 2015 18:41
Location: Windows 11; 100% scaling

Re: Delete Directory

Post by hermhart »

But both %desktop% and %desktopreal% are taking me to the same place. Should it make a difference?

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Delete Directory

Post by highend »

Code: Select all

text quicksearch("/d", "%commondesktop%");
  text quicksearch("/d", "%desktopreal%");
One of my scripts helped you out? Please donate via Paypal

hermhart
Posts: 234
Joined: 13 Jan 2015 18:41
Location: Windows 11; 100% scaling

Re: Delete Directory

Post by hermhart »

It is not in %commondesktop%. But it is in %desktop% and %desktopreal% (which both point to the same location). Just strange that using the delete command to a directory in a sub-directory of %desktop% doesn't work. So I guess to get around this I will use %desktopreal%.

Thank you, highend.
Last edited by hermhart on 03 May 2025 12:48, edited 1 time in total.

jupe
Posts: 3292
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Delete Directory

Post by jupe »

SC delete requires full path, which %desktopreal% is, whereas %desktop% resolves to a relative path.

Post Reply