Multi-combo of script(s) and UDC(s)

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Post by ivan »

admin wrote:I did not follow this thread (been coding... :wink: ), so what is %nn% and%cp%?
TheQwerty would be able to tell you that one better. My knowledge of what it does extends only as far as knowing that it happens between me clicking OK and being prompted to move a folder to Recycle Bin.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Post by TheQwerty »

TheQwerty wrote:

Code: Select all

Set(%cf%,<curfolder>);
	Set(%cp%,<curpath>);
	Set(%nn%,<date yyyymmddhhnnss>);
EDIT: Also, as I said when I originally posted the script you might be able to get away without that Rename and SelFilter at the end, but they are the best guarantee I could come up with of selecting the correct folder for deletion short of doing a search.

If you continue to use #523;#523 focus should be on the correct folder so a simple Sel(+0) could be used, but as the next step is deletion I wasn't trusting of that case.

admin
Site Admin
Posts: 66517
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

ivan wrote:
admin wrote:I did not follow this thread (been coding... :wink: ), so what is %nn% and%cp%?
TheQwerty would be able to tell you that one better. My knowledge of what it does extends only as far as knowing that it happens between me clicking OK and being prompted to move a folder to Recycle Bin.
You can see the resolved variables in the bottom list of the Step dialog. Right-Click any of the three buttons in that window and select Copy Command Parsed and Resolved. Then paste here...

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

Post by ivan »

For that particular step that I said is taking a lot of time here's the paste:

Code: Select all

rename
bat
20080627123757

C:\Users\xyz\Desktop\DLs\name_of_the_folder

admin
Site Admin
Posts: 66517
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

ivan wrote:For that particular step that I said is taking a lot of time here's the paste:

Code: Select all

rename
bat
20080627123757

C:\Users\xyz\Desktop\DLs\name_of_the_folder
So you are renaming C:\Users\xyz\Desktop\DLs\name_of_the_folder to C:\Users\xyz\Desktop\DLs\20080627123757

Why would take that so long??? :? Does the rename finally succeed, or is the folder maybe locked by some process?

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

Post by ivan »

I don't really get a chance to see if the folder is locked to some process because XYplorer doesn't let me. However, once the "Would you like to move this crap to Recycle Bin" dialogue appears I can click and use Unlocker but no it doesn't find any handles.

admin
Site Admin
Posts: 66517
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

ivan wrote:I don't really get a chance to see if the folder is locked to some process because XYplorer doesn't let me. However, once the "Would you like to move this crap to Recycle Bin" dialogue appears I can click and use Unlocker but no it doesn't find any handles.
You can always open a 2nd XYplorer instance to check the locking.

My other question was: does the rename happen?

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

Post by ivan »

admin wrote:My other question was: does the rename happen?
Yes, the rename happens successfully.

admin
Site Admin
Posts: 66517
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

ivan wrote:
admin wrote:My other question was: does the rename happen?
Yes, the rename happens successfully.
Okay. I don't know what in the world could take 8 seconds in a simple rename. When you rename that folder manually, is it slow as well?

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

Post by ivan »

admin wrote:Okay. I don't know what in the world could take 8 seconds in a simple rename. When you rename that folder manually, is it slow as well?
Nope, manually rename is lightning quick.

admin
Site Admin
Posts: 66517
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

ivan wrote:
admin wrote:Okay. I don't know what in the world could take 8 seconds in a simple rename. When you rename that folder manually, is it slow as well?
Nope, manually rename is lightning quick.
Please show the complete script you are using, and specify any other relevant conditions. I'll try it myself then...

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

Post by ivan »

admin wrote:Please show the complete script you are using, and specify any other relevant conditions. I'll try it myself then...
Here's the complete 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);
   #169;
Can't think of any relevant conditions. Folder structure's pretty simple: A --> B --> C. Extract from RARs in C, rename to C, move to B, delete C.

admin
Site Admin
Posts: 66517
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

ivan wrote:
admin wrote:Please show the complete script you are using, and specify any other relevant conditions. I'll try it myself then...
Here's the complete 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);
   #169;
Can't think of any relevant conditions. Folder structure's pretty simple: A --> B --> C. Extract from RARs in C, rename to C, move to B, delete C.
Thanks, will be much faster in next beta upload... :)

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

Post by ivan »

admin wrote:Thanks, will be much faster in next beta upload... :)
Whatever magic you have done, it worked! It's "snap your fingers"-quick now. Now if there was a way for XYplorer to detect when WinRAR is done extracting and take things on autopilot from there on autopilot it would be superb! 8)

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

Post by ivan »

I am also wondering if it would be possible to implement an option to override Windows so it doesn't display the pop-up asking if i want to move to bin or if i want to permanently delete... 8)
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

Post Reply