Skip Navigation Links
Novas Tecnologias
Ferramentas Adicionais
Ferramentas Adicionais


Dica No :
159
Assunto : Visual Basic
Titulo: Como descobrir a data da última alteração de um arquivo

Gostou do texto ? Vote e dê sua opinião! Pontuação atual :

Translate this page now :






Adicione aos Favoritos!
BlogBlogs Rec6 Linkk Ueba Technorati Delicious DiggIt! StumbleUpon



Para fazermos isso podemos utilizar uma combinação da função Dir, para verificarmos se um arquivo existe com a função FileDateTime, para pegarmos a data e hora da última alteração.

Podemos fazer uma pequena função que, se o arquivo existe, devolve sua data e hora. Veja :

Public Function DataArq(ByVal sArq As _
String) As Variant
If Dir$(sArq) <> "" Then
DataArq = FileDateTime(sArq)
Else
DataArq = "ERRO"
End If
End Function

Esta função recebe o nome do arquivo como parâmetro. Se ele existir devolve a data e hora do arquivo, se não devolve uma mensagem de erro.

Veja um exemplo de como chama-la :

msgbox DataArq("C:\Quadrado 02.BMP")



Nome :
E-mail:
Comentarios :
 
 
Os Últimos Comentários
data: 6/30/2018 5:12:00 AM
nome: yeJnbUihGXVRZliT
email: matthewepm@aol.com
comentário:
An estate agents https://www.drugonsale.com viagra A source familiar with the situation told Reuters that the board decided to form the special committee last week. It was not clear if that decision came before or after Reuters reported that BlackBerry was warming to the idea of going private to give itself room to recover.

data: 6/30/2018 4:04:00 AM
nome: LBubkPEMPOMUyoS
email: edison2g@usa.net
comentário:
I'm in my first year at university https://www.drugonsale.com purchase medication online
But it didn't last. Swidorsky noticed Logan was acting strange, Stevenson said. He lifted his left arm a lot as if he were stretching, but she sensed there was something wrong with her son. They soon learned he had a tumor the size of an orange on his left kidney.


data: 6/30/2018 1:21:00 AM
nome: DbDDKKFwGJJBihuUtpe
email: rodneyxjo@lycos.com
comentário:
Incorrect PIN https://www.drugonsale.com cialis âÂ?Â?No Congress before this one has ever, ever, in history been irresponsible enough to threaten default, to threaten an economic shutdown, to suggest America not pay its bills, just to try to blackmail a president into giving them some concessions on issues that have nothing to do with a budget,âÂ? Obama said.

data: 6/30/2018 12:16:00 AM
nome: SYaSpHUoPlX
email: bernardow31@aol.com
comentário:
I wanted to live abroad https://www.drugonsale.com purchase medication online
The Dutch government, which first asked for arbitration in the case two weeks ago, said it had already nominated its chosen arbiter in the case. It said Russia had until November 3 to choose its arbiter. If Russia had not done so by then, the tribunal's president could choose one instead.


data: 6/29/2018 10:24:00 PM
nome: CkueYcuoerjTUQPFy
email: antonia5z@gmail.com
comentário:
I've been made redundant https://www.drugonsale.com kamagra They studied the fish under varying temperatures in the lab and in salt marsh pools in Maine. Fish in the marshes ate insects, worms and other natural food sources, while the lab fish were fed mercury-enriched food.

 1  
Dicas
Dica do Dia
Receba Dicas Por Email
E-mail :  
 


 (help)
Aceito receber informativos do devASPNet, informações de eventos e treinamentos

Veja Quais Informativos Você Receberá

Pesquisar Dicas
Pesquisar Artigos, Dicas e Noticias

Banco de Dados
Algumas Entrevistas
Links Importantes

Búfalo Informática, Treinamento e Consultoria
R. Alvaro Alvim, 37/920 Centro - Cinelândia - Rio de Janeiro Cep: 20031-010
Tel : (21) 2262-1368 (21) 9240-5134 E-mail : Contato@bufaloinfo.com.br