SUPINFO International University

SUPINFO Institute of Information Technology
Laboratoire Microsoft




Récupérer le nom d'un fichier à partir du nom complet

Accueil > Script > maintenance > Récupérer le nom d'un fichier à partir du nom complet

Récupérer le nom d'un fichier à partir du nom complet

Par Ismaël LIMBADA, LABORATOIRE SUPINFO DES TECHNOLOGIES MICROSOFT
Publiée le 27/06/2006 vers 10h.

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("C:\Scripts\Test.txt")

Wscript.Echo "Absolute path: " & objFSO.GetAbsolutePathName(objFile)
Wscript.Echo "Parent folder: " & objFSO.GetParentFolderName(objFile)
Wscript.Echo "File name: " & objFSO.GetFileName(objFile)
Wscript.Echo "Base name: " & objFSO.GetBaseName(objFile)
Wscript.Echo "Extension name: " & objFSO.GetExtensionName(objFile)


Proposer un script

Notre avis :

Votre avis :

Réactions :
0

Votants :
1

Visites :
6685

1
2
3
4
5




Retrouvez ci-dessous les autres sections du Laboratoire Microsoft