Questions tagged [fileinfo]

fileinfo refers to the properties of a file that are not part of the content, but rather meta-information such as file type, last modification time, id in the file system, etc. Use this tag for questions about reading / modifying the fileinfo in programmatic ways.

Fileinfo refers to the properties of a file that are not part of the content, but rather meta-information such as file type, last modification time, id in the file system, etc. It can include custom properties such as ID3 tags for audio files.

The list of attributes may vary depending on the file system.

Use this tag for questions about reading / modifying the fileinfo in programmatic ways.

361 questions
-1
votes
1 answer

C# FileInfo move foreach

I have this code: FileInfo finfo = new FileInfo(Path.Combine(Directory.GetCurrentDirectory(), "backup", file.Key)); var fsize = finfo.Length; if (fsize != file.Value) { DialogResult modifiedcleofiles = MessageBox.Show("Oops! Modified files…
Evaldas L.
  • 323
  • 1
  • 4
  • 16
-1
votes
1 answer

Displaying image data from folder using Image Created Date criteria?

I have two controls for displaying images from a folder, they are: ImageList and ListView Now I can to display images using the above controls simply without any criteria. But I want to: Show Images based on the date of image created. For this…
usminuru
  • 335
  • 4
  • 8
  • 19
-1
votes
1 answer

Why do File.GetLastWriteTimeUtc and FileInfo.LastWriteTime return different values for GMT?

So I have a file.. var myFile = C:\docs\MyFile.pptx and when I noticed that FileInfo fi = new FileInfo(myfile); var lastModified = fi.LastWriteTime; and var lastModified = File.GetLastWriteTimeUtc(myFile); are returning different values. Why is…
JKennedy
  • 18,150
  • 17
  • 114
  • 198
-1
votes
4 answers

Returning a files name as string

I have a List< FileInfo > fileList and I am trying to make a variable containing the File name like the code below: var newFileName = fileList.Select(x => x.Name).ToString(); Now I would expect the value of newFileName to be the files name but the…
Simon
  • 151
  • 2
  • 10
-1
votes
1 answer

Wrong Item Selected in Combo Box (C#, WPF)

Wrong Item Selected in Combo Box (C#, WPF) I do have a comboBox and a textBox. When I select an item (html file) in my combo box, I would like to add the content into my text box. Here is what I've got so far: public void SetDataPoolToComboBox() …
sjantke
  • 605
  • 4
  • 9
  • 35
-1
votes
2 answers

PuTTY run sh can't install fileinfo extension

I have a DreamHost server, and I would like to install the fileinfo extension. I managed to create a custom php.ini file that's cool, but I'm totally stuck at this part in their documentation: Please make sure to run 'dos2unix fileinfo_ext.sh' from…
Side
  • 1,753
  • 9
  • 35
  • 64
-2
votes
1 answer

file.Exist returns true on localhost and returns false on server c#

I've a grid that contains file list (that on another server) and download buttons for them on each row. When button clicked, file should be downloaded. When I click it on localhost, file.Exist returns true and I can download the file. However, when…
1teamsah
  • 1,863
  • 3
  • 23
  • 43
-2
votes
2 answers

C# FileCreationTime

I have the below module which is part of a larger program for searching the text within DOCX files. This is the code for when the search button is clicked; { this.resultListView.Items.Clear(); try { foreach…
Adrian Brown
  • 103
  • 1
  • 3
  • 15
-2
votes
1 answer

Trouble specifying destination filename for use in FileInfo.Copy example from MSDN

I'm using two DateTimePickers to specify a date range, then I'm using a CheckedListBox to specify some strings for filenames with wildcards to enumerate in each day's subdirectory contained within a system environment variable path. I want to copy…
Dshiz
  • 3,099
  • 3
  • 26
  • 53
-2
votes
1 answer

Can't add a tag using system.io file, as i need it to be cast as a fileinfo object later in my code

The tag to the file anode is causing errors with the directory anode, is this because they are one and the same? Also i think That the casting from the tag to a fileinfo object isn't working. Any suggestions as to how to get the fileinfo into the…
bimtopian
  • 3
  • 4
-2
votes
2 answers

Fileinfo not working in Xampp v3.2.1

hey i want install a portal(CMS) on xampp but its give me a some error about file info and cant install it if anybody can help me to fix it please anwser error image
jackson
  • 21
  • 1
  • 4
-2
votes
2 answers

Why am I not getting the text from my file with this code?

I am trying to load all my "error log files" into one (hopefully not gigantic) string, and then assign that string to a Multiline textBox: private void PopulateTextBox() { const string errLogDir = "\\ErrorLog"; …
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
-2
votes
2 answers

Strange bug in different compilation mode

I'm encountering a very strange bug which appears only when compiling in Release mode, while in Debug mode the code runs perfectly. Moreover, the bug is encountered only in one machine (a user reported this). This is the stack…
Niccolò Campolungo
  • 11,824
  • 4
  • 32
  • 39
-2
votes
1 answer

Unable to Delete Folder Containing Invisible Files

Using Visual Studio 2010 C#. I'm attempting to delete a folder in C:/Windows/MyFolderA where MyFolderA is a folder placed there by my software - Not Microsoft's. I've used this code to delete the contents of the folder and the folder itself: foreach…
Demasterpl
  • 2,103
  • 5
  • 24
  • 32
-3
votes
1 answer

Not reading the content of files in wpf

var dir = new DirectoryInfo(Path); foreach (FileInfo flInfo in dir.GetFiles()) { String name = flInfo.Name; long size = flInfo.Length; DateTime creationTime = flInfo.CreationTime; …
Manoj Chowdary
  • 97
  • 1
  • 3
  • 15
1 2 3
24
25