Re: Using DOS commands in VB

From: J French (erewhon_at_nowhere.uk)
Date: 10/30/04


Date: Sat, 30 Oct 2004 13:17:16 +0000 (UTC)

On Fri, 29 Oct 2004 11:45:29 -0700, Talarin <anonymous@devdex.com>
wrote:

>Hey guys,
>
>Here's my situation, I have a file out on a shared drive. I need to
>take this file, parse it, and save it to a database. Afterwards, I then
>need to move this file to an archive folder.
>
>The problem I'm having is trying to move the file. I'm not all that
>familiar with the 'Shell' command, but I'm assuming I have to use
>something along the lines of
>
>Call Shell(Environ("Comspec") MOVE <source path>, <destination path>)
>
>Unfortunately, I can't get it to work and am having trouble finding some
>documentation on the subject. I'm not even sure if the above is the way
>to go or not. Can anyone provide me with some help?
>
>BTW, this is using VB6 in a Windows 2000/XP enviroment.

Why not do it in VB using FileCopy or Name (re-name) ?

S$ = Environ("Comspec") + " /c MOVE "
Call Shell( S$ + <source path> + " " + <destination path>)

Make sure the source and destination paths are wrapped in quotes.



Relevant Pages

  • Re: Architectural advice needed on client-side browser scripting
    ... can easily serialize a DataTable (in this case the INFORMATION_SCHEMA views ... easily parse that XML to load listboxes or arrays. ... on a database chosen parse it for all tables in this database ... list all tables in the chosen database as interactive interface ...
    (comp.lang.javascript)
  • Re: Connection problem with Access
    ... CurrentDb.Name produced the path to db2). ... As far as permissions go I have given myself 'administer' rights on ... everything, including the database. ... almost every time I have seen documentation for the ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Parsing and storing formulas
    ... you could easily store different views/stored ... >I was wondering how I can parse a mathematical formula in a storable way. ... > be stored for in the database. ... > The second idea is to represent the formula as a tree. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Command-line option parsing
    ... > I disagree about the example being all you need. ... perfectly valid and I'll try to improve the documentation. ... > At the end of the parse() method (and why is it self.parse, ... they don't detract from the "Perl modules are well documented" meme. ...
    (comp.lang.ruby)
  • RE: Disconnect from FlashDisk
    ... you somehow extract parts of the master database ... Set objFSO = New Scripting.FileSystemObject ... > FileCopy SourceFile, DestinationFile ... >>> FileCopy SourceFile, DestinationFile ...
    (microsoft.public.access.modulesdaovba)

Loading