Is it possible to copy the app you are running to another directory? How?
Printable View
Is it possible to copy the app you are running to another directory? How?
You can programmatically copy your own programs .Exe to anywhere, essentially, that you wish.
What is your goal?
no... you can't copy a file thats in use...
I believe SKitchen8, that you are thinking about a database. You can't copy a database while it is open, but a running exe is another animal. :D
Too bad that I don't understand your code. Would it be possible to code an example for me pls? Need the code very badly.
Thx!
VB Code:
FileCopy App.Path & "\YourProg.Exe", "c:\backup\YourProg.Exe"
or of course, you can use the name statement provided within Visual Basic
Name ("C:\whater", "C:\whatever")
The Name statement renames a file and moves it to a different directory or folder, if necessary. Name can move a file across drives, but it can only rename an existing directory or folder when both newpathname and oldpathname are located on the same drive. Name cannot create a new file, directory, or folder.
Using Name on an open file produces an error. You must close an open file before renaming it. Name arguments cannot include multiple-character (*) and single-character (?) wildcards.
okay, im done w/ this thread... why can't i just be right for once??