How to move then extract archives in 1 script?

Discuss and share scripts and script files...
Post Reply
pleiades
Posts: 52
Joined: 13 Aug 2016 10:36

How to move then extract archives in 1 script?

Post 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!

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

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

Post 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...
One of my scripts helped you out? Please donate via Paypal

pleiades
Posts: 52
Joined: 13 Aug 2016 10:36

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

Post 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,,

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

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

Post 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...
One of my scripts helped you out? Please donate via Paypal

Post Reply