Link to home
Create AccountLog in
Windows OS

Windows OS

--

Questions

--

Followers

Top Experts

Avatar of aneilg
aneilg🇬🇧

7-Zip Command Line Issues
At present I have two files:-      
Name.zip.001
Name.zip.002

I have created a batch file, but I am having issues with the command line.
This is what I have so far.
"\\Server\Data Transfers\Folder\Folder\ExecutablePath\7-Zip\7z.exe" e "Filename_20151203.zip.001" -o"\\Server\Data Transfers\Folder\Folder\FileDrop\" -y -p"password"

I can using 7-Zip manually and it works, but as mentioned I need to automate the process.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


SOLUTION
Avatar of John SmithJohn Smith🇬🇮

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of aneilganeilg🇬🇧

ASKER

ill give it a go on my local drive.

Avatar of aneilganeilg🇬🇧

ASKER

Thanks but that does not resolve any of the issues I have,

At present I have two files:-      
Name.zip.001
Name.zip.002

I have created a batch file, but I am having issues with the command line.
This is what I have so far.
"\\Server\Data Transfers\Folder\Folder\ExecutablePath\7-Zip\7z.exe" e "Filename_20151203.zip.001" -o"\\Server\Data Transfers\Folder\Folder\FileDrop\" -y -p"password"

I can using 7-Zip manually and it works, but as mentioned I need to automate the process.

Avatar of John SmithJohn Smith🇬🇮

What error(s) are you getting with this?

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of aneilganeilg🇬🇧

ASKER

Thanks.

The batch file just does not seem to do anything.

i've just googled it, and i may need to use 7za.exe instead off 7z.exe

Avatar of Bill PrewBill Prew

Your script looks reasonable at first glance, 7z.exe is the right executable, and you seem to have the right options.

Is the ZIP file located in the current directory when you run the BAT script?

Are there any subfolders in the ZIP, or just files?

Try leaving the trailing "\" off the -o folder path, although I haven't tested to see if that can be a problem.

Do you have write permissions to that network folder?

If you change the -o parm to a local folder path, does that work?

~bp

Avatar of aneilganeilg🇬🇧

ASKER

hello,

I'll give it a go.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of joinaunionjoinaunion🇨🇦

Are you trying to transfer it in a unzipped format in the new folder?

ASKER CERTIFIED SOLUTION
Avatar of deroodederoode🇳🇱

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of aneilganeilg🇬🇧

ASKER

Thanks deroode.
I've got it working on my local drive. I had the incorrect parameters.
e C:\Zip\*.*.001 -aoa -oC:\Zip -ppassword

Thanks.

The only issue i now have is, i am using an execute process task.
executable 7z.exe
arguments e \\Server\folder\subfolder\subfolder\subfolder\*.*.001 -aoa -oC:\Zip\7-Zip -ppassword

When the process task runs it just seems to pick up the server folder \\Server\, then scan that folder.

It does not seem to pick up any of the subfolders or the file.

Avatar of aneilganeilg🇬🇧

ASKER

Figured it out.

Because the folder paths have spaces, needs to be enclosed in quotes.
e "\\Server\Folder\SubFolder\SubFolder\SubFolder\*.*.001" -aoa -o"\\Server\SubFolder\SubFolder\SubFolder\SubFolder\" -ppassword

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of deroodederoode🇳🇱

Great! that's learning by doing...
Windows OS

Windows OS

--

Questions

--

Followers

Top Experts

This topic area includes legacy versions of Windows prior to Windows 2000: Windows 3/3.1, Windows 95 and Windows 98, plus any other Windows-related versions including Windows Mobile.