TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Richard Arnold
1.7k
13
17.1k
SaveFileDialog copies empty zipped file to destination
Dec 31 2012 8:49 PM
I have a toolStripDropDownButton on a menuStrip for importing files and saving them to different directories. In my calling code I pass a string filter for .pdf and .mp3.zip audio magazine files. I pass 2-parameters to a class, the filter and the magazine type.
I am using an OpenFileDialog for the user to select a source folder for various files. I then pass the filter to the OpenFileDialog.Filter and based on the string magazine type (magType) I use a SaveFileDialog to save the file(s) to particular folder locations depending on the file type.
The code successfully copies the PDF file to its location. However, the method copies an empty zipped file (.mp3.zip) to the destination folder. The original is megabytes in size, the copied version displays 0KB in size.
NOTE: Whereas I allow the user to select the source file and location, depending on the dialog.Filter passed in, I want to copy the files to directories I have created using DirectoryInfo.
Please provide some suggestions on why the file is copied but is 0KB. The source code is attached. Thank you.
P.S. This question was answered via suggestions in the automated reply.
Attachment:
savefiledialog copies an empty zipped file to the destination folder.zip
Reply
Answers (
0
)
sorce code
Through Query How to Export Excel Data to Sqlserver2005