Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9296761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:54:13+00:00 2026-06-18T21:54:13+00:00

i am actually working on an application where a blob file is retrieved from

  • 0

i am actually working on an application where a blob file is retrieved from my database, converted to the original file and then saved on the desktop. I would like to know if it is possible to check if a file named “xxx” already exists on the desktop and then it shall prompt me for another name. Here is my code:

myData.Read();

FileSize = myData.GetUInt32(myData.GetOrdinal("filesize"));
rawData = new byte[FileSize];

myData.GetBytes(myData.GetOrdinal("file"), 0, rawData, 0, (int)FileSize);

// must change paths
String desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
fs = new FileStream(@desktopPath + "\\" + myData.GetString("title") + myData.GetString("extension"), FileMode.OpenOrCreate, FileAccess.Write);

myFilePath = desktopPath + "\\" + myData.GetString("title") +myData.GetString("extension");

fs.Write(rawData, 0, (int)FileSize);
fs.Close();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T21:54:15+00:00Added an answer on June 18, 2026 at 9:54 pm

    You’re looking for the File.Exists() function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually ,i am working on a livechat application its works fine.This application is tabbed
I'm working on a WPF application that contains a wrapper UI that is actually
Actually I have a file . I am working in linux environment. I need
I'm creating a facebook application in flex. I'm actually working on the friends component
hiii frends, actually i am working on an application which requires images such as
I'm actually working on an Android application, which accepts a keyword to search in
Actually In my sample Application using Flex+Java(spring+Hibernate)... In that i'm inserting data into Database.
I'm actually working on a Windows Phone 7 application that contains a few comboBox,
Actually i'm working with an old Web Application (it's development has 10 years). Earlier,
This actually is a working application. Albeit without much in the way of error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.