Get free space and Insert values into registry

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Get free space and Insert values into registry

Post by tiago »

1. can get() obtain a drive's free space?

2. i can

Code: Select all

text get("regcmd", "mp3");
but how do i change a registry value using xy scripting?
Power-hungry user!!!

Twisten
Posts: 204
Joined: 27 Apr 2008 10:30

Re: Get free space and Insert values into registry

Post by Twisten »

You need to use an external tool for that, look into the 'REG' (Console Registry Tool for Windows) usage.

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

Re: Get free space and Insert values into registry

Post by highend »

1. report() in conjunction with get("drives", x) can do that.
One of my scripts helped you out? Please donate via Paypal

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Get free space and Insert values into registry

Post by tiago »

After fighting a good couple of minutes against quotes i finally made it, Twisten, so thanks.

highend, I just can't. I tried
text report('The item "{name}" has {free space}.' . "<crlf>", "1");
and it works fine, but I have to "goto %computer%;" first. It fails if I specify "d:\" "d:" instead of "1".
What am I doing wrong?

@admin: Under POM, if I specify a "open <curitem>" after using the reg tool XY gives a warning on recursion. That will not happen if I use run() instead. Anything broken?
Last edited by tiago on 24 Apr 2012 16:43, edited 1 time in total.
Power-hungry user!!!

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

Re: Get free space and Insert values into registry

Post by highend »

It seems to be a limitation of the report command. A path (only) instead of an item with full path isn't supported. So opening a new tab at %computer% and closing it after afterwards seems to be the only viable option atm.
One of my scripts helped you out? Please donate via Paypal

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Get free space and Insert values into registry

Post by tiago »

highend wrote:It seems to be a limitation of the report command. A path (only) instead of an item with full path isn't supported. So opening a new tab at %computer% and closing it after afterwards seems to be the only viable option atm.
Thanks. Can you please comment on the issue I posted to admin in my edit of previous post?
Power-hungry user!!!

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Get free space and Insert values into registry

Post by Stefan »

tiago wrote:1. can get() obtain a drive's free space?
Remembers me at > http://www.xyplorer.com/xyfc/viewtopic. ... 807#p67807
serendipity wrote:Some of it is already possible using SC "Report" in Drives Mode.

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Get free space and Insert values into registry

Post by tiago »

Thanks for the heads up Stefan but it's far from elegant in the context of a script which must monitor the amount of free drive space.
If the problem is lack of or broken support of report() I hope admin blesses us with a solution.
Power-hungry user!!!

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Get free space and Insert values into registry

Post by tiago »

highend wrote:It seems to be a limitation of the report command. A path (only) instead of an item with full path isn't supported. So opening a new tab at %computer% and closing it after afterwards seems to be the only viable option atm.
Admin: can you do something about this, please?
Power-hungry user!!!

Post Reply