I think it would be great if it would be possible to select multiple folders, press the same KS and have scripts execute as if you were to do the same thing but folder-by-folder manually.
Thoughts are always appreciated...ARRR!

But what if the script doesn't act on what you have selected but uses alternative criteria of what to do with files of certain type?serendipity wrote:This is possible already, the folders you want to perform an action need not be fixed. You can select bunch of folders and whatever action you want can be performed on those folders.

I already have a script. Here it is...serendipity wrote:It would be much easier if you say what exactly you want the script to do. I am not an expert in scripting, but I am sure others will also try and help you here. So bring it on.
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; 
You can repeat that script that over and over again by labelling your script (eg. xyz) using "sub xyz" command at the end of the script. I havent tried this because I dont have winrar and time right now, but you get the idea.ivan wrote:I already have a script. Here it is...serendipity wrote:It would be much easier if you say what exactly you want the script to do. I am not an expert in scripting, but I am sure others will also try and help you here. So bring it on.So basically, I want that script to work on multiple selected folders without having to go into each one like I currently have toCode: 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;
Code: Select all
"xyz : xyz"
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);
//Delete
#169;
sub xyzI doubt this will do the intended because I actually don't see the part where XY would recognise the list of folders it has to apply the script to and whether it will do all at once or one by one.serendipity wrote:You can repeat that script that over and over again by labelling your script (eg. xyz) using "sub xyz" command at the end of the script. I havent tried this because I dont have winrar and time right now, but you get the idea.

Between steps 3 & 4 those extracted files would need to be renamed into the name of that folder. Also, in step 5 the whole folder needs deleting, not just the RAR files, but apart from that your illustration is correct.serendipity wrote:OK, let me try to understand this:
1. Say you have 5 folders which have 5 rar files each inside them.
2. you want to go inside folder 1,
3. extract the contents of 5 rar files,
4. move the extracted files to parent folder,
5. delete the 5 rar files and
6. continue doing the same with folders 2, 3 and so on.
Is that illustration right?

I tried a circuitous script but it should do what you need.ivan wrote:Between steps 3 & 4 those extracted files would need to be renamed into the name of that folder. Also, in step 5 the whole folder needs deleting, not just the RAR files, but apart from that your illustration is correct.serendipity wrote:OK, let me try to understand this:
1. Say you have 5 folders which have 5 rar files each inside them.
2. you want to go inside folder 1,
3. extract the contents of 5 rar files,
4. move the extracted files to parent folder,
5. delete the 5 rar files and
6. continue doing the same with folders 2, 3 and so on.
Is that illustration right?
Code: Select all
focus;
//add dummy extension to selected folders
rename b, *.<mmmdd>;
// call script _xyz
sub _xyz;
"_xyz"
// A message to make sure you can exit the loop anytime
msg "Extract files?", 1;
//filter by extension
#356;
//select first item
sel 1;
// set folder name (extension is skipped)
set %cb%, <curbase>;
// enter the selected folder
#160;
//removes the previous filter
filter;
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,%cb%);
Focus(L);
MoveTo("..\..");
#523;
#523;
Focus(L);
//Delete
#169;
//enable previous filter
#355;
// call script _xyz
sub _xyz