Page 1 of 1

How to move then extract archives in 1 script?

Posted: 21 Jul 2020 16:02
by pleiades
Hello,

I would like to combine 2 scripts that would move then extract archives without user input.

I'm using this to move archives/files into folders by date

Code: Select all

moveto "D:\reference\<date yyyy>\<date mm>\<date dd>",,,2,,-1,1,,
and then use Extractor.exe to extract the archives inside the folder.

I would like to run the script and it will move then extract the archives.

Thank you!

Re: How to move then extract archives in 1 script?

Posted: 21 Jul 2020 16:24
by highend
Create a variable that contains the location (it is needed twice)
Create a variable with all selected items without path
< your moveto command >
Loop over the variable with all selected items and create a "|" separated string that combines the location with each of these files
Run Extractor with that string as the first parameter...

Re: How to move then extract archives in 1 script?

Posted: 23 Aug 2020 12:10
by pleiades
highend wrote: 21 Jul 2020 16:24 Create a variable that contains the location (it is needed twice)
Create a variable with all selected items without path
< your moveto command >
is this correct? When I run it, I have 3 options and when I chose the first one, it create the correct folder but I can't make the $location to work on the 3rd option which is the moveto $location

$location = new("D:\reference\<date yyyy>\<date mm>\<date dd>", "dir");
$selected = <selitems>;
moveto $location,$selected,,2,,-1,1,,

Re: How to move then extract archives in 1 script?

Posted: 23 Aug 2020 14:25
by highend
Does moveto accept a list of (double-quoted), space separated list of items? Nope^^
<selitems |> or <selitems <crlf>> or ":list" would have worked...