473,386 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How do you access information of a file to use as a variable in code?

How do you access information of a file to use as a variable in code?

For example how can i get the filesize or length value of a music file?

Any help would be much appreciated!
Sep 7 '10 #1
2 1050
mzmishra
390 Expert 256MB
Expand|Select|Wrap|Line Numbers
  1. FileInfo f = new FileInfo(fileName);
  2. long s1 = f.Length;
Sep 7 '10 #2
Thanks alot thats perfect.
Sep 8 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Zachariah | last post by:
I've created a Windows Service application that creates a table in an Access database from the information in a text file, everytime a new textfile shows up in a certain directory. It functions...
0
by: Plumer | last post by:
Good morning everyone, Using C# I create a bog-standard System.Data.DataTable which I then Add to a System.Data.Dataset. I need to import that structure into an Access .adp file so I have...
1
by: Machi | last post by:
let say i have a web form with a button on it ... when i click the button, it will pop up one small window to allow me to save a pdf file, everything is done using code behind as below ... however,...
1
by: ROS38 | last post by:
I have an access 97 (I know, it's old, they won't let me upgrade, don't ask) databse that many of the people in my company use pretty constantly. Using it with access produces no errors ever....
3
by: JeffM | last post by:
I have a .dat file on a remote server that seems to be locked. I have tried to FTP to it and delete it, rename it, copy over it and I get the error. "Could not copy temporary files to the output...
2
by: John R. Dougherty | last post by:
I am using VB.NET, and have experience coding to open an Access .MDB file for retrieving/updating data. But I would like to be able to get at the schema of the database - see the tables list, list...
4
by: gpl666666 | last post by:
Does anyone know any free online space which allows user to upload mdb Access database file?
1
by: saifulislam | last post by:
Hi All, i m a network administrator in a multinational firm. i m facing a problem while accessing an access databse file in the LAN. We have our database file where different employees make...
0
ADezii
by: ADezii | last post by:
In Tip #12, we showed how to display a Progress Meter within Access by using the SysCmd() Function. By using this same Function, with different Action Arguments, we will now demonstrate how you can...
9
by: LamSoft | last post by:
Class B { public B() {} } Class A : B { public static string ABC = "myABC"; public A() {} }
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.