Phil Posted August 31, 2009 Report Share Posted August 31, 2009 (edited) Hello, I´m big fan of Ketarin.. meaning I update 80+ apps. Well said that, hope you can give me a hand with two main issues when using commands to extract the applicacions. Note I´m not a coders or anything related, I´m just a simple user who tries to make things work. The first is that 7zipped packages don´t get extracted at all, even the 7Z.exe process hangs out, freezing too Ketarin, till I terminate it. Let me do some explain, I´m using the console version of 7zip, kind of the same config of the "Tech Toolkit 2.0" with the "7z x {file} -o"{root}PortableApps\{appname}\" -y commands after downloading. I have no idea where the issue comes from, is a bug of 7zip or I´m not using the proper commands, hope you can explain it to me. For example I got this trouble when updating Portable Tor (if you want to give it a try this is a fixed update link for Ketarin: http://downloads.sourceforge.net/project/portabletor/portabletor/PortableTor-{version}/PortableTor-{version}.exe?use_mirror=ufpr), also with Tor Browser, SMPlayer, etc. all packaged in 7zip format. If it is a 7zip bug I guess the workaround will be a batch file with relative paths (since I use it from my stick), well if that´s the case I would really thanks some help in how the bat command should be. Also what to do when the application comes compressed with a folder that has the app version? Is there a way to rename it when it gets extracted? for two reasons, one my old files don´t get replaced/deleted and two becouse I use a launcher and this might change the main exe app path And OK, the only dude that I got left is if there is an easy way/commands etc, for extracting the {app} data of an installer and copying it files to a folder, while deleting after the extracted files (not the copied ones), since there are many portable application that comes bundled with it´s installer. I don´t really know if the 7zip console can manage it, I did some tests but it seemed to fail. Well that´s are all my headaches :S , hope you can tell me how to fix/make it work Cheers and Thanks Phil Edit: All working and solved, see the comments below (Thanks andreone and CybTekSol) Edited September 19, 2009 by Phil Link to comment Share on other sites More sharing options...
CybTekSol Posted August 31, 2009 Report Share Posted August 31, 2009 (edited) Welcome to the Ketarin forum Phil. You must pay close attention to your quotes and backslashes in the command line as well as 7-zip switches... try this: 7z x "{file}" -aoa -o"{root}PortableApps\{appname}\" -y and see if it works for you. Remember 7z.exe must be in your path or the same folder if you do not define it in your Ketarin settings. For example, I use a global variable {run_7-zip} which is defined as "C:\Program Files\Utilities\7-Zip\7z.exe". So for me the above command would be: {run_7-zip} x "{file}" -aoa -o"{root}PortableApps\{appname}\" -y Post your results when you get a chance. Also... for the last part, check out Universal Extractor that has been discussed in the forum before... just do a search for it... I think it may do what you want with installers along with some custom commands... possibly... del /f "{root}PortableApps\{appname}\*" that is run as a command before update. Be VERY careful with such commands for obvious reasons! Edited August 31, 2009 by CybTekSol Link to comment Share on other sites More sharing options...
Phil Posted August 31, 2009 Author Report Share Posted August 31, 2009 Thanks for your quick answer. Tried this 7z x "{file}" -aoa -o"{root}PortableApps\{appname}\" -y and I got the same issue and so far I tried also {root}PortableApps\7-ZipPortable\App\7-Zip\7z.exe x {file} -o"{root}PortableApps\{appname}\" -y using the portable 7zip, instead of the console in the directory of Ketarin. Anyway both get me the same error. At this point I gues it´s a bug of the 7zip console, since it does extract a part* of the file. Also when I extract with the GUI, it´s all fine. Maybe there is a way of using the GUI in a automated/silently way..? Or I may just use another command line extraction app :S Also... for the last part, check out Universal Extractor that has been discussed in the forum before... just do a search for it... I think it may do what you want with installers along with some custom commands... possibly... del /f "{root}PortableApps\{appname}\*" I´m going to check it with more time thanks Link to comment Share on other sites More sharing options...
andreone Posted August 31, 2009 Report Share Posted August 31, 2009 (edited) The first is that 7zipped packages don´t get extracted at all, even the 7Z.exe process hangs out, freezing too Ketarin, till I terminate it. Let me do some explain, I´m using the console version of 7zip, kind of the same config of the "Tech Toolkit 2.0" with the "7z x {file} -o"{root}PortableApps\{appname}\" -y commands after downloading.I have no idea where the issue comes from, is a bug of 7zip or I´m not using the proper commands, hope you can explain it to me. There's a bug that happens when the archive contains a lot of files. This generates a lot of message into the console. Too much actually and Ketarin hangs, as well as 7zip. You can check out this thread: http://ketarin.canneverbe.com/forum/viewtopic.php?id=268 The solution is then to append & to your command line 7z x "{file}" -aoa -o"{root}PortableApps\{appname}\" -y & The bottom side is that the 7z output messages won't appear into Ketarin's console, but that's not a very big deal. Edit: I just noticed -aoa into your command line. This means nothing for 7z. A typical command line to extract an archive would look like 7z x -y -r -o"{install_root}\{category}\{appname}" "{file}" However, I tested and it doesn't bother 7z Edited August 31, 2009 by andreone Link to comment Share on other sites More sharing options...
CybTekSol Posted September 1, 2009 Report Share Posted September 1, 2009 (edited) The solution is then to append & to your command line... Sorry Phil... I forgot to mention this one... and it had been an issue for me lately... I had been having intermittent issues with extracting FileZilla lately which has a high file number count and had not appended & to the end of the command-line as an oversight with 1200+ apps... all is well now... I just noticed -aoa into your command line. This means nothing for 7z. It was a typo on my behalf andreone... I use -ao which sets the overwrite mode during extraction per 7-zip's help file for command switches... Edited September 1, 2009 by CybTekSol Link to comment Share on other sites More sharing options...
Phil Posted September 1, 2009 Author Report Share Posted September 1, 2009 (edited) Sorry for the delay. The solution is then to append & to your command line Thanks andreone and CybTekSol! That solved it Edit: Still there is one app that freezes! :S kind of weird... all the other works good now. Here is the log 01/09/2009 18:19:28: Update started with 7 application(s) 01/09/2009 18:19:31: SMPlayer Portable: Replacing {version} in 'http://downloads.sourceforge.net/smplayer/smplayer-portable-{version}.7z' with '0.6.8' 01/09/2009 18:19:31: SMPlayer Portable: Using referer: (none) 01/09/2009 18:19:32: SMPlayer Portable: Server source file: /smplayer/smplayer-portable-0.6.8.7z 01/09/2009 18:19:32: SMPlayer Portable: Determined target file name: C:\PortableApps\Comprimidos\smplayer-portable-0.6.8.7z 01/09/2009 18:19:32: SMPlayer Portable: Checking if update is required... 01/09/2009 18:19:32: SMPlayer Portable: Update required, 'C:\PortableApps\Comprimidos\smplayer-portable-0.6.8.7z' does not yet exist 01/09/2009 18:25:20: SMPlayer Portable: Executing command: 7z x C:\PortableApps\Comprimidos\smplayer-portable-0.6.8.7z -o"C:\PortableApps\" -y &" The other way would be to use start"" as I read in another treath. Also... for the last part, check out Universal Extractor that has been discussed in the forum before... just do a search for it... I think it may do what you want with installers along with some custom commands... possibly... del /f "{root}PortableApps\{appname}\*" Now I checked it and it works well with Universal Extractor, I´m using {root}PortableApps\UniversalExtractor\UniversalExtractor.exe {file} PeerBlock & What I´m figuring out now is how to move the files with the time delay/pause... as this post points out http://ketarin.canneverbe.com/forum/viewtopic.php?id=32&p=2 Also with more time I may try the commands "copy" and "del" to be able to get the files always in the same folder with 7zip (In 7zip I guess there should be no trouble). I just noticed -aoa into your command line. This means nothing for 7z. A typical command line to extract an archive would look like if my memory it´s ok, I lately read somewhere that 7zip overrides by default the files when extracting and by what CybTekSol said, the -aoa does the same. Anyway one or the other way it works Thanks for all the help! Edited September 1, 2009 by Phil Link to comment Share on other sites More sharing options...
andreone Posted September 1, 2009 Report Share Posted September 1, 2009 Edit: Still there is one app that freezes! :S kind of weird... all the other works good now... Executing command: 7z x C:\PortableApps\Comprimidos\smplayer-portable-0.6.8.7z -o"C:\PortableApps\" -y &" wouldn't it be the trailing " at the end of the command line? What I´m figuring out now is how to move the files with the time delay/pause... as this post points outhttp://ketarin.canneverbe.com/forum/vie … 32&p=2 You can use this portable trick: ping -n TIME_TO_WAIT 127.0.0.1>nul where TIME_TO_WAIT is the number of seconds you want to wait + 1 (e.g. ping -n 2 127.0.0.1>nul waits 1 second) This is not very elegant, but it works everywhere and doesn't require an additional tool. About dos commands, to forget rmdir /s /q "path" to quickly delete a folder structure. Link to comment Share on other sites More sharing options...
Phil Posted September 2, 2009 Author Report Share Posted September 2, 2009 (edited) wouldn't it be the trailing " at the end of the command line? My bad, you are totally right. where TIME_TO_WAIT is the number of seconds you want to wait + 1 (e.g. ping -n 2 127.0.0.1>nul waits 1 second)This is not very elegant, but it works everywhere and doesn't require an additional tool. Thanks Edited September 14, 2009 by Phil Link to comment Share on other sites More sharing options...
Phil Posted September 11, 2009 Author Report Share Posted September 11, 2009 OK, I need some guidance here. Maybe it´s just a minimal mistake, anyway.. There are some apps that when they get extracted create it´s own folder, so on I´m trying to copy the files inside that folder and then deleting the files in the original extracted directory. Now the name of the created folder is the "appname+partoftheversion", then is there a way to use a path like \App*\ to complete the folder relative folder name? For example I´m trying this with one app 7z x {file} -o"{root}PortableApps\{appname}\" -y & copy "{root}PortableApps\{appname}\DrvBK*\*.*" "{root}PortableApps\{appname}\*.*" & del /f "{root}PortableApps\{appname}\DrvBK*\*" The folder that the extracted app creates is "DrvBK2", where the "2" may vary, and the version variable I´m using it´s like "2_0".. different I have actually tried a lot of combinations, tried with the copy /f command, \y at the end. Also I wonder if when the app gets updated the "copied" files will replace the old copied ones or if I need another command for that. well I´m out of ideas and the info in the forum it´s for kind of advanced people... so hope you can give me a hand on this. Link to comment Share on other sites More sharing options...
CybTekSol Posted September 14, 2009 Report Share Posted September 14, 2009 (edited) I usually do this manually as out of the nearly 1350 apps that I update with Ketarin for building and configuring PCs and Linux Boxes only a handful of these exhibit that behavior. That said... I have tested this and it works for me... your mileage may vary. {run_7-zip} x "{file}" -r -aoa -o"C:\Temp\Temp" & ping -n 5 localhost > nul & xcopy /s "C:\Temp\Temp\[iNSERT RECURRING SUB-FOLDER NAME HERE with {version} if needed]\*.*" "{root}PortableApps\{appname}\" & ping -n 5 localhost > nul & rd "C:\Temp\Temp" /s /q& Hope this helps... Addendum: If you use /e for the xcopy switch, folders, subfolders and empty folders will be copied... Also... you can use {root}Temp\Temp or another to your liking... Adjust delays as necessary... Also, you can use a similar rd command before an app is updated to get rid of the existing apps extracted folder... i.e. rd "{root}PortableApps\{appname}" /s /q Use /y switch with xcopy if you wish... I didn't add it for this test and if you use the above rd command before an update, it isn't necessary... BTW... -aoa is a valid 7-Zip switch, it is always overwrite without prompting... use whatever you wish that works for U... At least this should get U goin' Edited September 14, 2009 by CybTekSol Link to comment Share on other sites More sharing options...
Phil Posted September 19, 2009 Author Report Share Posted September 19, 2009 Thanks! thats really helpful, more than enough to get me goin' I´m going to give it a spin right now... about the part of the version in the name I will simply create another variable and with that It should do the trick. I usually do this manually as out of the nearly 1350 apps That´s a crazy, I thought my 200+ portable apps where more than enough! maybe that´s becouse I don´t have yet many Linux apps besides the LiveCDs/USB.... Well once again thanks for all the help, I have learned tons Cheers Phil Link to comment Share on other sites More sharing options...
andreone Posted October 20, 2009 Report Share Posted October 20, 2009 I recently discovered that dos redirection can handle nul. So appending your command line with > nul will make it totaly silent. No more &&, ping or sleep. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now