Sign in to follow this  
Followers 0
PcExpert

Copy file from computer to computer

6 posts in this topic

#1 ·  Posted (edited)

Hello,

Howto copy a file from computer to computer?

This is what I tried:

FileCopy("\\COMPUTERNAME\SHARE\test.txt", @TempDir & "test.txt")

But that doesn't work. The file is not present in the temp dir.

InetGet doesn't work either.

Does somebody know how to solve this?

Edited by PcExpert

Share this post


Link to post
Share on other sites



Missing backslash. A good idea is to use MsgBox'es to check stuff like this...

FileCopy("\\COMPUTERNAME\SHARE\test.txt", @TempDir & "\test.txt")

Share this post


Link to post
Share on other sites

Hello,

Howto copy a file from computer to computer?

This is what I tried:

But that doesn't work. The file is not present in the temp dir.

InetGet doesn't work either.

Does somebody know how to solve this?

You are missing a "\" between @Tempdir and filename :)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

It still doesn't work. This is my code:

$1 = InputBox("Music Drive", "Wat is de naam van de artiest?")
$2 = InputBox("Music Drive", "Hoe heet het nummer?")
FileCopy("\\Server\Admin's Drive\Onderhoud\Music\database.txt", @TempDir & "\database.txt")
FileWriteLine(@TempDir & "\database.txt", $1 & " - " & $2)
FileCopy(@TempDir & "\database.txt", "\\Server\Admin's Drive\Onderhoud\Music\database.txt")
MsgBox(64, "Music Drive", "Bedankt voor je aanvraag!")

Share this post


Link to post
Share on other sites

Do you expect it to update the original file when you do not use the overwrite flag with FileCopy?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

actuallt yes. Ian't that possible then? PROBLEM FIXED!

Edited by PcExpert

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0