Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a command utility on network drives?

Status
Not open for further replies.

boolean

Programmer
Mar 5, 2002
35
US
hey pals...

i seem to have come up with another one of those Qs again!
all i need to do is 'run a command utility on network drives'...

here is what I am doing and what I need to do:
1. Am working on the creation of a utility, creating zip arhives being one of the modules.
2. For creating Zip archives, am using the command-line interface of Winzip.
3. If I was to zip, say, the files in the 'D:\Sham\Test' folder, I create a batch file at runtime that would contain the following:
D:
CD SHAM
[winzips command line utility to add the files in the 'Test' folder]
4. I do this because, when the files are added to the zip archives, the folder information is also stored along with the files. In this case, a 'temp.txt' file would be added with the folder information pointing to '\Test' folder (which is correct)
5. If I was to just run winzip directly, the 'temp.txt' file would be added from the root drive ('D:' in this case) and with the folder information pointing to '\Sham\Test' (which is not what I want)
6. So reaching the precise physical folder location before running winzip is very important.
7. Now there comes a problem when files in my 'Shared Network Drives' need to get zipped. All I have is the UNC path to the Network drive.
8. One option would be mapping the network drive and using the Mapped Physical Drive Letter for reaching the correct physical folder location.
9. But that would mean that at one-point-of-time, no more that 20-plus users can use my utility to create Zips as there would be a shortage of mapped drive letters.

This is the current scenario.
Now, if there was some way by which I could reach the folders in the Shared network drives without actually having to physically Map them, it would be just perfect.
Can any of you think of any possible solution or work-around?

Thanks for the help thats on its way... Sham aka boolean... be practical/be straight... true/false?!
 
Why don't you use the unc-path? Perhaps I can't figure out exactly what you mean, but with the newest beta version of wzzip I tried to rebuild your problem, but I didn't manage. I used the following statement:
wzzip -p -r test.zip \\uncpath\Sham\*.* and it seems to do the job, it only stores \test as Folder-information. Notice that -p is lowercase, if you use -P it will not work.

hope this helps
Andreas
 
Thanks for your time Schweiger...
Your point is absolutely valid...
Let me rephrase my question a bit! I am currently using a 'listfile' to specify the files to add to my archive... now what would my list file contain? i mean... how would the different files be specified in the List File?

This what my list file used to contain earlier...
Test\1111.txt
Test\2222.txt
Test\3333.txt
Test\4444.txt
Test\5555.txt

when I run wzzip from 'D:\Sham' using the above list file... files get added just fine... but is there a way by which the same output could be derived even when running wzzip from any location (say C:)
There cud be two ways to do it...
1. Change the list file in some way to pick files from the specified 'Base Folder'.
2. Is there any switch associated with wzzip using which we can actually specify the 'Folder information' for the files being added?

Thanks again... Sham aka boolean... be practical/be straight... true/false?!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top