Rename current item with name of current folder

Discuss and share scripts and script files...
ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Post by ivan »

eurytos wrote:I *think* he was trying to say that he wants to be able to choose whether a preference can be overwritten by a script.
something like:
preference one: script can overwrite
preference two: do not allow script to overwrite


I could be way off though...
That's correct. I was hoping we could have a couple of options to say if scripts can override preferences or not.
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Post by ivan »

I must once again reiterate the importance of making an option for a script to override a preference. Currently, option #170 is useless to have in a script because option #169 does the same thing with the box to turn off deletion confirmations unticked.
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

ivan wrote:I must once again reiterate the importance of making an option for a script to override a preference. Currently, option #170 is useless to have in a script because option #169 does the same thing with the box to turn off deletion confirmations unticked.
Please see command delete...
Proud XYplorer Fanatic

ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Post by ivan »

jacky wrote:Please see command delete...
Ok, so I can substitute this:

Code: Select all

#170;
with this:

Code: Select all

delete [1][,0][<items>]
But what do I use for

Code: Select all

<items>
in this script:

Code: Select all

Set(%cf%,<curfolder>);
   Set(%cp%,<curpath>);
   Set(%nn%,<date yyyymmddhhnnss>);
   OpenWith("""C:\program files\winrar\winrar.exe"" e -- *.rar * %nn%-temp", "s");
   Msg("Press OK when WinRAR is finished.",1);
   GoTo("<curpath_s>\%nn%-temp")
   Sel(a);
   Rename(bat,%cf%);
   Focus(L);
   MoveTo("..\..");
   #523;
   #523;
   Rename(bat,%nn%,,"%cp%");
   SelFilter(%nn%, d, Name);
   Focus(L);
   #170;
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

hmm.. so you want to delete, using the recycle bin, but no confirmation, right? If so, simply use:

Code: Select all

Delete(1,0);
No need to specify a parameter for <items> as it'll use selected items on List since focus was put there right before.

BTW you realize you had that exact example right on the wiki:
XYwiki wrote:delete 1, 0, ":list";
Sends all selected List items to the Recycle Bin without asking for confirmation
Proud XYplorer Fanatic

Post Reply