Re: Using DOS commands in VB
From: J French (erewhon_at_nowhere.uk)
Date: 10/30/04
- Next message: MikeD: "Re: A Tiny CHALLENGE: WordPad or Generic Word Object & Object references..."
- Previous message: MikeD: "Re: Protecting code"
- In reply to: Talarin: "Using DOS commands in VB"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: MikeD: "Re: A Tiny CHALLENGE: WordPad or Generic Word Object & Object references..."
- Previous message: MikeD: "Re: Protecting code"
- In reply to: Talarin: "Using DOS commands in VB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|