Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to execute a DOS command
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00806685
Message ID:
00806706
Vues:
21
Oups. My mistake.

Since Copy and MD and intrinsic commands, they cannot be called this way.

Why don't you use FSO ( http://support.microsoft.com/default.aspx?scid=kb;en-us;190882 ) to manipulate files and folders?


>Hi,
>
>The Shell Function in VB "Runs an executable program and returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero."
>
>But it doesnt runs a DOS command, for example:
>
>I've created a Form with a button
>
>sub Command1_click()
> shell "copy c:\Folder\doc1.sql c:\Sql\doc2.txt"
>end sub
>
>when I run it, returns
>
>Run-time error '53'
>File Not Found
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform