jeddha
asked on
switch to DOS mode
what is the easy way to switch to DOS mode from VB , I want to
copy a file from one directory to floppy disk as zipfile .
copy a file from one directory to floppy disk as zipfile .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I want to copy a file from one loaction to another
shell "command.com /c " & "copy c:\test.txt a:\"
here its not working
shell "command.com /c " & "copy c:\test.txt a:\"
here its not working
That is odd. It worked fine for me. Did you put the disk in A drive?
Anthony
Anthony
Why don't you just use a FileSystemObject to copy the file? It would probably be a lot easier.
Just add a reference to the Scripting Library in your project and use the following code:
Dim fso
Set fso=CreateObject("Scriptin g.FileSyst emObject")
fso.CopyFile filesource, filedestination, overwrite
Just replace the filesource with your source file and the filedestination with your destination file. The overwrite is an optional boolean which will force the file to be copied if it set to true (by default it is False). I think the above code is correct.
Just add a reference to the Scripting Library in your project and use the following code:
Dim fso
Set fso=CreateObject("Scriptin
fso.CopyFile filesource, filedestination, overwrite
Just replace the filesource with your source file and the filedestination with your destination file. The overwrite is an optional boolean which will force the file to be copied if it set to true (by default it is False). I think the above code is correct.
ASKER
I mean DOS mode printing is very fast compared to others
Shell "command.com"
In Windows NT, 2000, XP:
Shell "cmd.exe"
Anthony