08 March 2018, 19:30 | #61 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
every heard of lhasa?
current version on aminet, but a new version is in the making. the nice feature of lhasa, it does create a configurable folder, where it does extract the archive: Code:
$ lhasa.exe -ew=new_folder Anim2gif.lha new_folder/Anim2gif.info - Melted : o new_folder/Anim2gif/An2gif - Melted : o ... maybe it's somehow usefull. |
08 March 2018, 20:55 | #62 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,357
|
I wonder if it would make sense to define .BRA and .KET as something else than < and >.
|
24 March 2018, 19:52 | #63 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Updated script:
Code:
.KEY SRC,DST .DEF SRC "Downloads:" .DEF DST "RetroStuff:" LIST <SRC> PAT=#?.lha LFORMAT="LhA x *"%P%N*" *"<DST>%M/*"" >"RAM:Downloads.txt" LIST <SRC> PAT=#?.lzx LFORMAT="LZX x *"%P%N*" *"<DST>%M/*"" >>"RAM:Downloads.txt" LIST <SRC> PAT=#?.zip LFORMAT="UnZip *"%P%N*" -d *"<DST>%M*"" >>"RAM:Downloads.txt" EXECUTE >NIL: "RAM:Downloads.txt" |
02 May 2018, 14:59 | #64 | |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Quote:
|
|
02 May 2018, 15:35 | #65 |
Banned
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
|
I would avoid them in filenames Foebane...
|
02 May 2018, 18:50 | #66 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
|
02 May 2018, 20:36 | #67 |
Registered User
Join Date: Feb 2008
Location: RNO
Posts: 1,009
|
@ is fine on Amiga AFAIK, and there are many other characters besides the listed ones which do work too, but IMHO it's best to avoid any special characters and keep it simple You never know when you have to copy files to other systems and what could happen there. Keep it plain and don't even use spaces and you're on safer side
|
02 May 2018, 20:57 | #68 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,357
|
Anything but ~ # " ? or any kind of parentheses/brackets is fine.
|
03 May 2018, 09:11 | #69 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
You can use every possible character except ":" and "/".
Some others can cause problems under special circumstances, such as command-line parsing, pattern-matching, or for use on pc filesystems. If you really really really want to be safe, use only caps and 8.3 |
03 May 2018, 11:12 | #70 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
I just ran my usual script (the subject of this thread) on a whole bunch of files with @ in the filenames and I had no problems, and I've read that if there were going to be problems, they would've occurred during this process. But none, so it's fine.
|
08 May 2018, 09:00 | #71 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Script update:
Code:
.KEY SRC,DST,TXT .DEF SRC "Downloads:" .DEF DST "DemoZone:" .DEF TXT "RAM:Downloads.txt" LIST <SRC> PAT=#?.exe LFORMAT="COPY *"%P%N*" TO <DST>" ><TXT> LIST <SRC> PAT=#?.lha LFORMAT="LhA x *"%P%N*" *"<DST>%M/*"" >><TXT> LIST <SRC> PAT=#?.lzx LFORMAT="LZX x *"%P%N*" *"<DST>%M/*"" >><TXT> LIST <SRC> PAT=#?.zip LFORMAT="UnZip *"%P%N*" -d *"<DST>%M*"" >><TXT> EXECUTE >NIL: <TXT> |
10 June 2018, 23:18 | #72 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Latest update:
Code:
.KEY SRC,DST,TXT .DEF SRC "Downloads:" .DEF DST "DemoZone:" .DEF TXT "RAM:Downloads.txt" LIST <SRC> PAT="2 #?.exe" LFORMAT="COPY *"%P%N*" TO <DST>" ><TXT> LIST <SRC> PAT="4 #?.exe" LFORMAT="COPY *"%P%N*" TO <DST>" >><TXT> LIST <SRC> PAT="#?.lha" LFORMAT="LhA x *"%P%N*" *"<DST>%M/*"" >><TXT> LIST <SRC> PAT="#?.lzx" LFORMAT="LZX x *"%P%N*" *"<DST>%M/*"" >><TXT> LIST <SRC> PAT="#?.zip" LFORMAT="UnZip *"%P%N*" -d *"<DST>%M*"" >><TXT> EXECUTE >NIL: <TXT> |
14 September 2018, 12:21 | #73 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
How can I use parameters instead of set keys like the above? The script is proving to be a bit inflexible at the moment, and I want to be able to set my own FROM and TO directories after the script name on the CLI.
How do I go about doing this, please? |
14 September 2018, 12:26 | #74 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,773
|
What is the point of this script? Is it so hard to manually extract an archive from the CLI?
You seem to insist on making things so much more difficult for yourself than they need to be. I honestly don't get it. |
14 September 2018, 12:41 | #75 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
Quote:
(If you don't want to have default values and have parameters being required, add /A after each parameter which doesn't have a .def entry.) |
|
14 September 2018, 13:13 | #76 | |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Quote:
Really? Wow, that's useful! But if I do wish to use parameters, are the quotes optional or required? Does it make any difference? |
|
14 September 2018, 13:27 | #77 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
Quote:
Do you mean command "param1" "param2" vs command param1 param2 for typing script name and parameters on the cli ? If so, it's same as any other command, it does not matter unless there are spaces in parameters. |
|
14 September 2018, 13:38 | #78 | |
Registered User
Join Date: Feb 2008
Location: RNO
Posts: 1,009
|
Quote:
If you wouldn't want an option to give parameters to the script, we wouldn't have used these .KEY and .DEF at all in the first place. We'd probably just used the SET command to set local variables. You need quotation marks if parameters contain space characters, otherwise not needed. So, this would work, for example, like these ways: Code:
batchextractscript Downloads2: DemoZone2: RAM:Downloads2.txt Code:
batchextractscript SRC=Downloads2: DST=DemoZone2: TXT=RAM:Downloads2.txt Code:
batchextractscript TXT=RAM:Downloads2.txt SRC=Downloads2: DST=DemoZone2: Code:
batchextractscript TXT RAM:Downloads2.txt SRC Downloads2: DST DemoZone2: Not an archive, but archives, maybe hundreds of them at once. Last edited by jPV; 14 September 2018 at 13:45. |
|
14 September 2018, 16:53 | #79 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
I was at work when I posted earlier today, but when I came back I tried what Meynaf suggested and it worked perfectly! Thanks, Meynaf and jPV!
I actually thought that ".DEF" stood for "DEFINE" and not "DEFAULT", that was my error. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unable to extract NDK39.lha | Hiddenevil | support.Apps | 8 | 06 November 2017 11:14 |
Using Xdftool with LHA archives.. | bugsymalone666 | support.Other | 6 | 25 June 2017 02:27 |
Self Extracting LHA Archives | hipoonios | support.Apps | 7 | 16 January 2015 23:15 |
Dopus suddenly won't extract LhA Files | manic23 | support.Apps | 3 | 30 March 2013 13:43 |
Any app to extract multiple archives??? | keropi | support.Apps | 4 | 02 April 2007 13:21 |
|
|