Solved

Auto zipping a mdb - extract filepath

Posted on 2006-06-26
14
412 Views
Last Modified: 2012-08-13
cross ref:  http://www.experts-exchange.com/Databases/MS_Access/Q_21896200.html

Looks like I still need to be able to zip a mdb on the fly and set the path to a to My Documents.

After many suggestions on zipping files I am using the following code.  I am looking for a way to modify the final path of the zip do within  the extraction process.

I am a little confused is the target the file that has been zipped or is it to be zipped and same for source?

Function zipfiles()
Dim source As String
Dim target As String

    target = "\\Wabelhdk0215892\Intranet Information Server\CorePlan\Manual PLANIT Forecast For Scrubbing.mdb"
   
    source = "C:\Documents and Settings\Manual PLANIT Forecast For Scrubbing.zip"
    'source = "\\Wabelhdk0215892\Intranet Information Server\CorePlan\Manual PLANIT Forecast For Scrubbing.mdb"
    ShellWait "C:\temp\zip.exe -D """ & target & """ """ & source & """"
 End Function


I am currently using zip.exe, due to the fact that is what my client is currently using.

What I am trying to accomplish is zipping a mdb that is on a server (ie target), however I would like the extracting file to contain the path of source not the 'source.  What is the process for limiting the file structure of the zipped file.

My client will be using a dummy mdb to copy the newly zipped file to their local pc and I do not want them to have to drill down thru several flle levels to extract the mdb.

Thanks,

Karen
0
Comment
Question by:Karen Schaefer
14 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 16986619
Karen, I thought u didnt want any paths?

If u want the source to be under C:\Documents and Settings

why dont u make your target in the same dir?

Copy your zip file into C:\Documents and Settings
then use that as your target

I guess then you may not need the -D

0
 

Author Comment

by:Karen Schaefer
ID: 16986947
I can't copy to my local C:\Documents.... because the user must be able to access the zipped file for copying to there local machine.  And my users can be accross the country and accross the hall.

Isn't there a way to keep the original path and zip the file with a different internal path for the user when they unzip the file?

Karen

I hope I am making myself clear - I want to keeep the server path for the zipped file, except when the new user opens the zipped file for extraction they see just the mdb and not a bunch of files to drill thru.

Thanks,

Karen
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16987245
Is it possible for you to compress and place zip.exe somewhere on the web so I can download and check?
U can either email me it, I will then produce results here or upload via http://www.ee-stuff.com
0
 

Author Comment

by:Karen Schaefer
ID: 16987580
I upload copy of the zip file.

Karen
0
 

Author Comment

by:Karen Schaefer
ID: 16987683
I tried emailing you - it came back -

Can I please have your email address - I can upload to ee either - size issue -says it is too small?

K
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16987857
did u compact it?
suggest u upload to http://www.ee-stuff.com so others can also see
Its getting late so I may not respond in time
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 65

Expert Comment

by:rockiroads
ID: 16987864
my email is in my profile (use without spaces)
0
 
LVL 10

Expert Comment

by:kirenievs
ID: 16988681
rockiroads stated "I guess then you may not need the -D". I think you should not use the -D. What I know this copy all the path (subdirectories) into the zip file.
0
 

Author Comment

by:Karen Schaefer
ID: 16988776
I am trying to avoid copying all the subdirectories into the actual zipped file.  Is it possible to set the file directories within the zipped file to a specific path - preventing the user when unzipping the file having to drill thru layers of subdirectories?

Thanks,

Karen
0
 

Author Comment

by:Karen Schaefer
ID: 17140784
Solution can be found at:

http://www.experts-exchange.com/Databases/MS_Access/Q_21924777.html

Thanks to all for the input.

Karen
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17141896
That email u sent the one day had the mdb, not the zip. It was the zip that was more required.
But you got a working solution, finally! Bet your well relieved now.
Good luck with the rest of your venture
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17149772
No objections
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 17168425
Closed, 500 points refunded.

GhostMod
Community Support Moderator
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now