File LastWriteTime And String Functions

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


ADVERTISEMENT

CreateTime And .LastWriteTime Are WAY Off?

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

Used LastWriteTime Instead Of CreationTime?

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

.net - FileInfoComparer Not Sorting Correctly (on LastWriteTime)

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

VS 2008 : Have A Class Where The Functions Of The Same Name Are Both Instance Functions And Shared Functions?

Dec 6, 2010

What I am trying to do is have a class where the functions of the same name are both instance functions and shared functions.

Public Shared Function Get...(byval xx as xx)

and

Public Function Get...

The Public Function uses a Property xx created in the constructor, whereas the Shared Function has the parameters (byval xx as xx).

View 1 Replies

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

String Functions Not Working?

Sep 27, 2010

I'm trying to make code that inserts something into a textbox. However, it appears the insert and remove code isn't working. Here's the

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim a As Integer = TextBox2.SelectionStart

[Code]....

View 18 Replies

String Functions Error With MSScriptControl Script?

May 1, 2009

I figured out my more recent issue, which took me 2 days all because my string functions are giving errors in VBScript using MSScriptControl, but any function that returns another datatype value is returning correctly.

[Code]...

View 3 Replies

Cannot Fiend Any Write Functions To A Text File Or To A Other File In Windows Direction?

Jun 23, 2010

I can not fiend any write functions to a text file or to a other file in Windows Direction

I want a simple write function for a button when click button it will write some lines to a file

View 4 Replies

Excel Maths Functions And Calls To All DLL Functions Documentation?

Jan 29, 2007

1) Is it possible to access the Excel mathematical functions without actually opening Excel?

I was thinking of through a DLL WinAPI call or maybe a delegate function or smaller program?

2) Does anyone know of a MS link or area that gives instruction on "how to" use every function of every Windows DLL at all?

Or for all those that Microsoft have chosen to document online at least.

View 1 Replies

File And Reference That File And Functions Within Application?

Feb 18, 2010

If I have a function that I've written or variables that I use all throughout my application and I don't have to have to copy and paste the code into each form, how can I put those into a file and reference that file and functions within my application?

View 3 Replies

.net - Mining Out Functions From A CPP File?

May 18, 2009

I am using Visual Studio 2005, VB. I have to parse a CPP file and list all the functions that are getting called in that CPP file. Is there any built-in object that can make things easier for me or should i go about searching for () and then finding out the function calls? That is also a bit difficult (I suppose) because there is lot of function chaining also.

View 1 Replies

Mining Out Functions From A CPP File?

Sep 27, 2009

Mining out functions from a CPP file

View 2 Replies

Overloading Several Functions In Interface File

Nov 12, 2008

I'm trying to overload several functions. These are first defined in an interface:

Code:
Namespace Scripting
Public Interface IGlobalFunctions
Overloads Function InOutBox(ByVal messageBoxText As String) As DialogResult
Overloads Function InOutBox(ByVal messageBoxText As String, ByVal caption As String) As DialogResult
[Code] .....

It complies and runs.. But I can only use the first version of InOutBox when I try to use the next one I get an error telling me: "Wrong number of arguments or invalid property assignment".

View 1 Replies

How To Create Header File Containing Class Functions

Mar 6, 2010

I'm wondering how I can go about creating something like a header file to contain some verbose functions I don't want to have to look at after I get them created. Something like in c++ like..
#include "classfunctions.h" to hide all the nasty stuff you don't want anyone to see.

View 6 Replies

Keeping All Functions And Subs In Separate File?

Mar 4, 2009

When I code in PHP I usually keep my functions in a separate file functions.php, I am going to write a small function in VB, is it ok to keep all my functions and subs in the 1 file linke in PHP? will they be available in all my form code?

View 3 Replies

VS 2008 - Functions Of System File Watcher

Aug 21, 2009

What exactly does a System File Watcher do? And what can you do with it?

View 10 Replies

VS 2008 Move Functions To External File And Call Them?

May 27, 2009

Im not exactly sure how to word this question, but I will give it my best shot.In a new program I am starting I would like to put all the code from a button_click event into a file (many others as well into different files), kind of like a class file in the sence of it being external.lets say I have a button called btnadd and it has some validation code in it Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click

[Code]...

View 5 Replies

WEBBROWSER CONTROL: Execute Functions In A Javascript File?

Aug 2, 2010

The website loads the javascript file with <script src="url.js" type="text/javascript"></script> How would I be able to execute the functions I want?

View 1 Replies

Differences Between VB Functions And Convert.To* Functions?

Feb 19, 2009

While converting types, I have found myself using both VB functions and BCL Convert.To* methods.
E.g.)

Cstr() vs. Convert.ToString()
CInt() vs. Convert.ToInt32()
CDbl() vs. Convert.ToInt64()
etc...

Are there any subtle differences that should be noted?

View 1 Replies

[2005] MembershipUser Functions - See Exactly What The Functions Are Doing?

Mar 4, 2009

Is there a way to see exactly what the functions are doing. What i mean is there a way to see the class? I know what it does, i just want to know the code.
For example the function: Membership.FindUsersByName()

View 1 Replies

Using FreeFile And OpenFile Functions To Find File-locking User Name Over Network?

Mar 16, 2012

using FreeFile and OpenFile functions to find file-locking user name over network

View 12 Replies

Vb8 Code To Open A Txt File - Search For A String In It & Extract String In A Excel File

Oct 11, 2010

i need a vb8 code to open a txt file,search for a string in it & extract string in a excel file.

View 2 Replies

VS 2005 : Make Program To Select A File, Create DataTables And Then Perform Some Other Functions?

Feb 9, 2011

I am attempting to have my program select a file, create DataTables and then perform some other functions. I want to be able to open another file and re-do the same steps.The problem I am having is that I add columns to my Datatables and when I try and to open another file while one is already open I get a message that a column of xyz is already added how do I properly "clear my datatable" or perhaps that isnt even the correct approach? Here is the code I have that Opens a File

HTML
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click

[code]....

This was working at one time but after adding to my project I must have placed something in the wrong place inadvertantly or it has soemthing to do with adding columns,?

View 4 Replies

Create Functions In Functions

Jul 1, 2011

I'm redoing a program for my company and my boss wanted me to created the entire thing through functions...

For the task I wanted to know is it possible to have functions within functions?
Sort of like in C where we would have nested structures?

Its a FILE I/O, with robot commands, moves and verifications....

So I would find the line in an excel spreadsheet where it moves, the coordinate, put it into an array.

Take the actual results store them into a two dimensional array...etc, etc....

Another function would eventually compare the results with the moves, and within a tolerance.

View 9 Replies

Read Binary File And In This File Found The String And Replace It With Other One And Save The File Afterwords?

Jan 11, 2011

i need to read binary file and in this file found the string and replace it with other one and save the file afterwords. I found many example to read binary, but to find and replace is for me mistery.

View 3 Replies

Split Comma Separated String In Text File And Save Each String In Different Variable?

Dec 5, 2011

These is the content of my txt file which is saved in D drive in my pc abc,1,2,3..I tried the flowing but it didn't work:[code]I am getting error on this line.. data = line.Split(","c)...it says this line isn't in use anymore or something and that I rather use LineInput but thats asks for filenumber and i don't know what that is. I am sorry but I am a complete beginner. what else can I try? [code]ok that error is gone now but now if I want to add these values to a list box..how can i do that?

View 1 Replies

Error4Class 'ScriptManager' Must Implement 'Sub CompileAndExecuteFile(file As String, Args() As String

Sep 24, 2009

I Ported this code from a code project article in c# called Nscript

heres the code

Base App
Imports System
Imports System.IO
Imports System.Resources

[code]....

Okay Now I only get two errors (I dont know how to solve them)

Error3Class 'BaseApp' must implement 'Sub OnCompilerError(errors() As CompilerError)' for interface 'IScriptManagerCallback'.

And

Error4Class 'ScriptManager' must implement 'Sub CompileAndExecuteFile(file As String, args() As String, callback As IScriptManagerCallback)' for interface 'IScriptManager'.

But What I would also Like to know (as well as how to fix the errors), is would the code work?

View 1 Replies

Read Unknown String After String In A Text File

Jan 30, 2010

i have a string with the value = "/var/mobile/Media/iTunes_Control/Music/" i need to read the next 13 letter after this string in a text file i am also using a loop to do this multiple times


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Header As String = "/var/mobile/Media/iTunes_Control/Music/"

[Code].....

View 2 Replies

Set String To Blank Spaces Before Reading String From File?

Mar 26, 2011

I've always been slightly stumped as to why the following happens if I write[code]...

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved