Jump to content

Search the Community

Showing results for tags 'wont copy'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hello Experts, I am trying to create a script that will go onto my network and copy a word document to a local folder then open it. When I hard code the FileCopy, it works perfectly, but when I use variables for file path and file name, only the local folder I need gets created. I cannot seem to get the file to open even when using the hard coded path in function FileOpen code. Here is my code with comments on what is happening. #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> $ProductName = "Microsoft Word 2013" $AbvLanguage = "ENG" $Network = "mynetwork" $Folder = "shared" $SampleDocs = "Sample Documents" $DocumentName = "Holiday Schedule.docx" ;Or $FileLocation = "mynetwork\shared\Sample Documents" SampleDocument () Func SampleDocument() ;This commented out hard coded line of code below works and does the copy, create local folder, and paste ;FileCopy ("\\mynetwork\shared\Sample Documents\Microsoft Word 2013\ENG\Holiday Schedule.docx","c:\Sample Documents\",8) ;The opening of FileOpen line of code below has not worked yet, even when the file copy works FileOpen ("C:\Sample Documents\Holiday Schedule.docx") ;Here are the 2 versions of FileCopy code(I only need one, one that works) and 1 version of FileOpen code I want to use with variables that has not work, ever ;FileCopy ("\\$Network\$Folder\$SampleDocs\$ProductName\$AbvLanguage\$DocumentName","c:\Sample Documents\",8) ;FileCopy ("\\$FileLocation\$ProductName\$AbvLanguage\$DocumentName","c:\Sample Documents\",8) ;FileOpen ("c:\$SampleDocs\$DocumentName") EndFunc What am I missing here? Is this as simple as you cannot use variables to create file paths in the FileCopy function?
×
×
  • Create New...