FileInfo.LastWriteTime And Citrix Wrong Value Returned?
Nov 29, 2010
I have an application written using VB.Net, framework 3.5.In the application I read LastWriteTime and CreationTime values for a file saved in file system. In general,the code works fine except one case when the application is started using Citrix environment. In this case the returned value for bithproperties is January 1, 1601.
View 2 Replies
ADVERTISEMENT
Jul 1, 2009
I am trying to read some data from an Excel 8.0 worksheet using OLEDB thusly:(Warning - contains curly braces)
Code:
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb");
using (DbConnection connection = factory.CreateConnection())
{
[code]....
The problem is that for some columns it sets the data type to be Double even though the spreadsheet column format is "Text" and teh column contains non-numeric data. Then when it gets to that cell it returns DBNull instead of the text value.
View 1 Replies
Oct 12, 2011
I have the following VB function which takes a FileInfo object as a parameter:
Public Shared Shadows Sub Start(ByVal filePath As FieldInfo)
XmlConfigurator.ConfigureAndWatch(New System.IO.FileInfo(filePath.ToString()))
End Sub
In another class I have the following code calling that 'Start' method. But VisStudio indicates there is a problem with the 'FilePath' argument that I'm passing.
[Code]...
View 1 Replies
May 29, 2010
When I look at a file on the server, Windows 7 explorer reports a Date Created date of 5/20/2010 10:49 AM, and a Date Modified date of 5/20/2010 10:50 AM. This is what I expect and what I believe to be true.
However, running my VB.NET code, when I do My.Computer.FileSystem.GetFileInfo(filespec).CreateTime, that value is something completely different: 12/31/1600 6:00:00 PM, and My.Computer.FileSystem.GetFileInfo(filespec).LastWriteTime is set to that same value (12/31/1600 6:00:00 PM).What am I doing wrong? I need to get the values associated with "Date Created" and "Date Modified" as displayed in Windows Explorer.
View 3 Replies
Mar 2, 2010
The solution was simple, I used LastWriteTime instead of CreationTime CreationTime will = time that file was placed on that drive LatWriteTime will = Last time that file was written too, thus the actual original creation time (unless file has been modified of course, which in my case [wmv files] is not going to happen)
View 1 Replies
Dec 22, 2011
I have a simple (ASP.NET) web page that lists files of a particular type in a folder and renders them in a ListView.
I've tried to sort them by descending LastWriteTime, that is, in reverse date order. However, although the sort process does change the order of the array, it doesn't sort it correctly. For example, one item with a LastWriteTime of #6/3/2011 12:00:00 is top of the list, but another item with a LastWriteTime of #12/16/2011 12:00:00 is halfway down the list after sorting.
Code:
Dim dirInfo As New DirectoryInfo(Server.MapPath(AppSettings.Item("ContentDir")))
Dim FileArrayList As New ArrayList(dirInfo.GetFiles("*.msg", SearchOption.TopDirectoryOnly))
[Code]....
View 2 Replies
Nov 2, 2009
1. I copy file xxx.yy from my C: drive to drive F: , which is a USB memory stick, and then execute the following code to get the date from both files:
[Code]...
View 12 Replies
Jan 12, 2010
I've got a DataGridview I want to remove columns from as it greatly increases performance when I format the DGV. The first time I remove columns in a loop (using the removeat) property, everythings fine. But when I try to remove more columns in another loop, it appears to remove the wrong columns and displays the wrong data. In other words, it displays the wrong data and headers; and the columns it does show has headers and cells that don't match.
[Code]...
View 2 Replies
Dec 21, 2008
i want to send keys to AS00 which is running under the citrix client. I tried normal senkeys option in vb.net. but not working. please give your valuable
View 1 Replies
Oct 12, 2011
I developed a very simple little windows program in VB 2005 to be used on desktops here at HQ. It reads a table from an Oracle DB into an array, let's the user select a text file, and then uses that data and text file to create an Excel spreadsheet.
Now they want a remote user to have access to it. We use Citrix for our remote application access. There is no install, I just copy the code to the Citrix server so I didn't need to put terminal server in install mode. When I am on the Citrix server, the application runs well. When I access the application through Citrix, I get an Oracle error from the ODBC data manager: Data source name not found and no default driver specified.
Does anybody know what is going on? how to make it work?
Are there any papers related to Windows applications on Citrix server that can help?
View 3 Replies
Aug 3, 2011
The vb.net code:Dim fs2 As Object fs2 = CreateObject("Scripting.FileSystemObject")
gets an error when I try to make an executable file out of this program and run it via citrix server.
The error is, the executable file won't run at all. When I try to run this locally, there are no errors at all.
View 1 Replies
Dec 10, 2009
I have a treeview dragdrop event written in VS2003. It works perfectly fine when the application is running on desktop, until we move the application to Citrix. So, users are now running it off from Citrix, the DragDrop event doesn't work anymore. It doesn't even have the effects of allowing dropping.
View 3 Replies
Nov 15, 2010
I'm looking for an API/function I can call to determine if software is running on Citrix, Terminal Services, or a stand-alone PC. Optimally, it would work something like this: [code]I would prefer something that worked from an API call as opposed to looking at something in the registry as we're having more and more customers that are locking down the registry.
View 3 Replies
Sep 23, 2010
I am connecting to Citrix database using SQL-defined ODBC. Having a problem with it. I am updating an existing application that uses the ODBC in SQL, and it connects fine. However, that database connection is secured, only available on the production side. The test side has a remote connection. I am attempting to change the remote connection values to match the parameters of the SQL-based ODBC, but the labels are different, and it doesn't seem to match. Specifically, I don't think I'm getting the DataSource correct. Also, it can't find the username and password that I use to log into the remoter connection - I get an error message "Invalid authorization specification".
View 1 Replies
Jan 19, 2010
I have never used VBS script before but I would like to use it to launch a Citrix WI page and to login in to the website.I have using XenApp5.0 FR2 with WebInterface 5.2.I have this script but this does not work on login, I can open the website but then I get an error:
strEmail = "myusername"
strPass = "mypassword"
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
[code]....
View 4 Replies
Sep 10, 2010
<div style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; margin-top: 8px; margin-right: 8px; margin-bottom: 8px; margin-left: 8px; background-image: initial; background-attachment: initial; background-origin:
[code].....
View 2 Replies
Nov 14, 2009
All tutorials I read before used Extension property to get the extension of a file. How can I get the type of file as a phrase? Example: .vb is 'Visual Basic Source File'. Like what Windows does in the Properties window of a file.
View 9 Replies
Nov 30, 2011
I'm using this query:
Dim FilesDirsQuery = From file In
_directory.EnumerateFileSystemInfos()
Select file.Name, file.Extension
It gets all files and directories in the _directory. But how to order the query by extension and name?
So I found that I have to use this to order by extension:
Dim FilesDirsQuery = From f In
_directory.EnumerateFileSystemInfos()
Select f.Name, f.Extension Order By Function(f As IO.FileInfo)
Return f.Extension
End Function
And I have to use "ThenBy", but it can't be used in my example. So I tried:
FilesDirsQuery.OrderBy(Function(f As IO.FileInfo)
Return f.Extension
End Function).ThenBy(..)
But it say's that my nested function doesn't have a compatible delegate. So what should I do?
View 2 Replies
May 13, 2009
I've got a Samsung Q1 attached to my computer, and I was hoping to use the FileInfo / DirectoryInfo objects to access the file on the device, however what I right click on a file in windows explorer I get a location of COMPUTER/Q1/DATACASTS/mine.mp3, and when I feed this into the DirectoryInfo object I get "Invalid network drive"
Something tells me I'm going about this the wrong way ... Is there a differant object I shoud use, or is my location string incorrect in format
View 1 Replies
Mar 19, 2012
I have used log4net in winforms before. First time using with a wpf console app. The console shows up and the console appender works exactly as in the winforms app. However in winforms I never had to give the full path to the log4net xml file. It is located in the same place where all the cs files are. (the default place where VS 2010 puts all its source files. So
XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo("log4config.xml"));
works in a winforms app's Program.cs->main() but for the wpf version where I have my own Startup class with my own Main() (instead of the autogenerated and hidden main()) I have to change the line to look like this
XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(@"c:fullpathlog4config.xml"));
This took me quite a while to nail down so I thought it may be worthwhile to figure why this is so. Anyone know ? I am using log4net ver 1.2.10.0. The log4net dll and xml both have copy to local = true in winforms and wpf.
View 3 Replies
Mar 20, 2009
I need to find the newest file in a file folder by looking at the creation date. What is the best way to go about this?
I already have the code below to do some other work. Can I insert code to do the comparison inside the For...Each,
Dim sourceFiles As FileInfo()
Dim sourceFile As FileInfo
For each sourceFile in Sourcefiles
...existing code
Next
View 2 Replies
Jun 23, 2011
is there something equivalent to fileinfo.exist to a Uri object?
for eaxample if Uri.exist=true then do something
View 3 Replies
Jul 13, 2010
I am making a small utility to rename my music library to the same syntax (00-Artist-Album-Title.mp3). All the files are MP3 and are correctly tagged (ID3). This is my current
VB.NET
Sub Main()
Console.WriteLine("Press any key to continue...")
[Code]...
Line 33 is where I need to get the song's ID3 tags from Song. I've done a fair amount of research but I can't find anything current or relevant.
View 3 Replies
Oct 3, 2011
I have a List of FileInfo objects that I want to sort by creation date & file size. Is there a way to do that?
View 5 Replies
Mar 9, 2009
I'm having bizarre performance results of the methods in FileInfo class.I'm using 5 methods of the FileInfo class in the Paint event.The datagridview is bound to the dataset.First the application searches files in the RecursiveSearch. When rows are added to the dataset the Paint event is fired and the rows displayed are filled with extra information from the FileInfo class . In this case the performance is very good. If I remove the DoEvents() from the RecursiveSearch the 5 methods of the FileInfo class become very slow (about 0.25sec for each line of code)!When the search ends, the user can scroll down to see the other files listed.At this point the Paint is again fired. This time the 5 methods of the FileInfo class are again very slow!
Private Sub RecursiveSearch(ByVal sPath As String, ByVal strPattern As String) System.Windows.Forms.Application.DoEvents() Try Dim strFolders() As String = System.IO.Directory.GetDirectories(sPath) Dim strFiles() As String = System.IO.Directory.GetFiles(sPath,
[code].....
View 3 Replies
Sep 12, 2010
I'm trying to create a song playlist for my application.I'm using system.io.fileinfo for displaying playlist file names by listbox and a second listbox for reading playlist files' contents.
Public Class Form1
Dim fi As IO.FileInfo
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
[code]....
View 14 Replies
Apr 4, 2011
I am using FileInfo to create a list of files in a directory. Is is possible to get video or image resolution as well using FileInfo. If not, what is the best way to pull that info down so I can include it in my csv file.
View 10 Replies
Sep 6, 2009
I have been having problems with creating a download list of files for a downloader and was getting unexplained "File Does Not Exist" returns. My .avi files were returning found but but .exe and .txt files were getting the not exists.
I have now found by pulling in the whole directory and examining the file contents that my .exe files are showing ".exe.exe". My .txt files are showing ".txt.rtf". Wow, browsing the file directory in Server 2008 only shows a single extension. I don't see an option to display the extension as a column, just the "type". My directory looks like this:
Name Type
File1.exe Application
File2.txt Rich Text Document
File3.avi AVI File
I had renamed some of these files, maybe I just cannot rename files. I will try using originals ans see if I am ok. Maybe I need to rename the offending files without the displayed extensions. Is this just something weird with the server browser?
View 2 Replies
Nov 12, 2010
How to access the fullpath field in a fileinfo object
View 3 Replies
Oct 29, 2010
OK I am working on a windows service that monitors specific directories and checks to see if a file is changed. If a file is changed, it is attached to an email and sent to an admin.
The way I solve the problem...
I create a FileInfo object to do the following:
-I check to see if the file has an extension that is allowed to be attached
-I check to see if the file is under a max size to be attached
I create an Attachment object to do the following:
-attach the file to an email
I then send the email. The problem with this is when I edit the file after it is successfully attached the first time, I CANNOT save changes to that file. I get an error message saying that it is being used and cannot change it. My solution to this problem is to call the "dispose()" method of the attachment class. When i do this, I can edit the file all I want to and the first attachment works but after that the "dispose()" method always throws an exception and the file is never attached to the email when the file is edited again. Why is this happening?
View 3 Replies