Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impossible to use relative path for source with "unzip"-option #5

Open
TymurGubayev opened this issue Jul 27, 2016 · 5 comments
Open

Comments

@TymurGubayev
Copy link

zipjs.bat unzip -source test.zip -destination testdir gives an error: "Either the target does not exist or is not a correct type"

The reason is the check in line 551: if(!Shell.Application.ExistsFolder(source) ){

I suggest replacing it with if(!Scripting.FileSystemObject.ExistsItem(source) ){

@npocmaka
Copy link
Owner

Are you sure you are using the latest version of the script?At the moment
the cited line is on line 549.
Though the idea is that Shell.Application.ExistsFolde uses S
hell.Application.NameSpace method which can be used to validate both
folders and .zip (and .cab) files (this is the function that windows
explorer uses to deal with zip files).

Are you sure your zip file is valid ? Can it be open with windows explorer?

-best regards.

On Wed, Jul 27, 2016 at 12:55 PM, TymurGubayev notifications@github.com
wrote:

zipjs.bat unzip -source test.zip -destination testdir gives an error:
"Either the target does not exist or is not a correct type"

The reason is the check in line 551: if(!Shell.Application.ExistsFolder(source)
){

I suggest replacing it with if(!Scripting.FileSystemObject.ExistsItem(source)
){


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#5, or mute the thread
https://github.com/notifications/unsubscribe-auth/AEUt1nhWNnNBC0w-LpA0ggnUw9TocibSks5qZysrgaJpZM4JWBmZ
.

@TymurGubayev
Copy link
Author

TymurGubayev commented Jul 27, 2016

Sorry for the line number glitch, I must've made some change I forgot about (formatting I guess).

Just tested it with files zipped via Explorer (Windows 10), this is how it looks like:

C:\tmp\custom_zip>zipjs.bat unzip -source update.zip -destination c:\tmp\custom_zip\test\
Either the target does not exist or is not a correct type

C:\tmp\custom_zip>zipjs.bat unzip -source c:\tmp\custom_zip\update.zip -destination c:\tmp\custom_zip\test\

C:\tmp\custom_zip>

@npocmaka
Copy link
Owner

checking this...

On Wed, Jul 27, 2016 at 1:22 PM, TymurGubayev notifications@github.com
wrote:

Sorry for the line number glitch, I must've made some change I forgot
about (formatting I guess).

Just tested it with files zipped via Explorer (Windows 10), this is how it
looks like:

`C:\tmp\custom_zip>zipjs.bat unzip -source update.zip -destination
c:\tmp\custom_zip\test
Either the target does not exist or is not a correct type

C:\tmp\custom_zip>zipjs.bat unzip -source c:\tmp\custom_zip\update.zip
-destination c:\tmp\custom_zip\test\

C:\tmp\custom_zip>`


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEUt1pQ8RO0sIxn65oXUMuj8emrHybQ9ks5qZzFrgaJpZM4JWBmZ
.

@npocmaka
Copy link
Owner

You'll have to use full path to the zip.I think this is explained in the
help message , though it still needs to be improved.In your case

zipjs.bat unzip -source %cd%\update.zip -destination
c:\tmp\custom_zip\test\

Could do the work.
Hope this helps.
The reason I didn't add relative to full path is because it cant be done so
easy with paths inside the zip. Though maybe I'll need to improve this.At
least the errormessage.

-best regards.

On Wed, Jul 27, 2016 at 1:34 PM, Vasil Arnaudov npocmaka@gmail.com wrote:

checking this...

On Wed, Jul 27, 2016 at 1:22 PM, TymurGubayev notifications@github.com
wrote:

Sorry for the line number glitch, I must've made some change I forgot
about (formatting I guess).

Just tested it with files zipped via Explorer (Windows 10), this is how
it looks like:

`C:\tmp\custom_zip>zipjs.bat unzip -source update.zip -destination
c:\tmp\custom_zip\test
Either the target does not exist or is not a correct type

C:\tmp\custom_zip>zipjs.bat unzip -source c:\tmp\custom_zip\update.zip
-destination c:\tmp\custom_zip\test\

C:\tmp\custom_zip>`


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEUt1pQ8RO0sIxn65oXUMuj8emrHybQ9ks5qZzFrgaJpZM4JWBmZ
.

@npocmaka
Copy link
Owner

Thinking of how to add relative paths...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants