Jump to content

Trying to copy a folder using UNC Path


Recommended Posts

I can't seem to copy a folder properly. I am likely using the wrong path syntax. This is a test app.

$FolderPath = @UserProfileDir & "\Desktop\Chipset Drivers\*.*"
FileCopy ( "\\server\folder\folder\*.*", $FolderPath )
Run("Explorer.exe " & @UserProfileDir & "\Desktop\Chipset Drivers")
MsgBox(4096,"Variable test",$FolderPath)

The variable comes up with the right information, but it isn't copying the folder and all of its contents. It doesn't matter what path I put in there either. When the Explorer part runs, it says it can't find the folder, but even Beta Run does not show me any errors.

Link to comment
Share on other sites

Hi,

from help:

; Method to copy a folder (with its contents)

DirCreate("C:\new")

FileCopy("C:\old\*.*", "C:\new\")

You neendn't the *.* when copying content.

so long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Yes this allowed my test to work. I won't be able to test it using real code until the next No-OS build comes through.

The actual code (which I removed) copies a folder over and runs a program, then deletes the folder afterwards. That may present problems in the future but we shall see.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...