|
The command format for extracting files is:
winzip32 -e [options] filename[.zip] folder
where -e is required.
options:
-o for "Overwrite existing files without prompting"
This along with System.Diagnostic.Process class might help.
|
|
|
|
|
System.Diagnostics.Process.Start("C:\\program files\\WinZip\\winzip32.exe", " -e c:\\qa.zip c:\\new");
Unzips qa.zip to path c:\new.
|
|
|
|
|
Well winzip is again a third party component...he wants to do it without using that...
.....
|
|
|
|
|
System.IO.Compression namespace has a class called GZipStream. It's fairly simple to use, so I'd start there before I went and shackled your app to winzip.
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
Hi
I need some help in C# where I will give a url and
this will download a file from a particular site and will save
in a given folder ,
example:
asking to download this "Palkirgaan.ram" file from
url - "http://www.ganguly.de/hemanta/Palkirgaan.ram"
and will save it "C:/Amitava" this folder.
Please help .
Thanks in Advance
Amitava
|
|
|
|
|
You can use DownloadFile or DownloadFileAsync method of WebClient class. There are several download managers available on codeproject if you want to explore them.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
hi,
use following statement
My.Computer.Network.DownloadFile("http://www.ganguly.de/hemanta/Palkirgaan.ram", "C:/Amitava/Palkirgaan.ram")
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
That's VB, and C# does not have the My class, because C# users don't need shortcuts, we write code :P
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
C# does not have the My class, because C# users don't need shortcuts, we write code
yaa. thats code is from vb.But i convert it with converter which is located at following address
Developerlabs[^]. so i think it is equivalent of c#.It's totally my mistake.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Rupesh Kumar Swami wrote: Developerlabs[^].
It's a stupid converter. It gives wrong answer for many conversions.
|
|
|
|
|
which reference I need to add .
and is it work in C#?
Amitava
|
|
|
|
|
hi amitava,
this code is from vb.net . By mistake i does not check the equivalent of this statement in c# is proper or not. so i am sorry for my mistake
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
It dose not matter .but if you have any example in C# please let me aware of that .
Regards
Amitava
|
|
|
|
|
hello,
when i move a form created in a separrated thread it appear multiple time in my screen.
i try the form.refresh() it work but not very well.
do someone have any idea??
best regards.
dghdfghdfghdfghdgh
|
|
|
|
|
I guess this means your thread is being called over and over. You should keep all UI in your main thread.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anyone know how i can change the drive letter of a cd drive. My company buys PC's pre configured but sometimes the CD drive comes mapped with the wrong drive letter.
Thanks.
|
|
|
|
|
You want to do this in general, or in code ? I am not sure you can do it, in C#
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yes i want to do it programatically inside my c# app. If c# doesn't contain any available functions is there a dos command i can call from my app. How does disk manager do it?
|
|
|
|
|
Dont know for CD's but for hard drives you can use Partition Magic.
Try shutting down the computer, pulling the power cable out of the CDROM and starting the computer. Then turn of the computer and put the power cable back in. This could work if, for an example, you have C: D: CDROM is E: and you get sometimes C: D: CDROM is F:
I hope it works and helps u.
Força Barça!
|
|
|
|
|
What on earth does this have to do with C# ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Really dont know Just trying to answer the question anyway
Força Barça!
|
|
|
|
|
Assuming you are using Windows, you can easily change the drive letter in "Computer Management" -> "Disk Management".
|
|
|
|
|
Can't be done with C#. You maybe able to do it by using unmanaged code within C# and using the functions built into the dlls that Disk Management uses.
Googling / pinvoke may help but unless your company is buying a large quantity of PCs it's probably not worth the effort - and if they are buying that sort of volume they should be able to instruct the suppliers to configure them to their requirements.
Edit:
Just found this[^] which you may find useful. Seems you may be able to create a script file in c# - save it - and then call Diskpart passing the script file as an argument???
Good luck!
Dave
|
|
|
|
|
That's the whole point, we are instructing the supplier to set the drive letter but sometimes they come to us set wrong. My application installs our system control software from our archive over the network and i want it to change the cd drive letter if it is wrong as well. Is there a windows shell utility i could call via a process?
|
|
|
|
|
Just edited my post above - check the edit.
Dave
|
|
|
|