Jump to content

a question


Recommended Posts

I want to copy a file here. is this well written in autoit.
FileCopy($sfldr1 & "\license.dat", "C:\Users\Documents\VirtualDJ\", 1) get an error message. It should go to documents\VirtualDJ\ which is or am I doing it wrong.

Thanks from Avatar56

Link to comment
Share on other sites

Hi @avatar56,

I guess your target folder is incorrect. You need to add your specific user "C:\Users\UserAccountName\Documents\VirtualDJ\". Maybe that's all ๐Ÿคž .
Please try again with a user account or use this macro:

Local Const $sTargetFolder = 'C:' & @HomePath & '\Documents\VirtualDJ\'

Best regards
Sven

Edited by SOLVE-SMART

Stay innovative!

Spoiler

๐ŸŒย Au3Forums

๐ŸŽฒ AutoIt (en) Cheat Sheet

๐Ÿ“Š AutoIt limits/defaults

๐Ÿ’Ž Code Katas: [...] (comming soon)

๐ŸŽญ Collection of GitHub users with AutoIt projects

๐Ÿžย False-Positives

๐Ÿ”ฎย Me on GitHub

๐Ÿ’ฌย Opinion about new forum sub category

๐Ÿ“‘ย UDF wiki list

โœ‚ย VSCode-AutoItSnippets

๐Ÿ“‘ย WebDriver FAQs

๐Ÿ‘จโ€๐Ÿซย WebDriver Tutorial (coming soon)

Link to comment
Share on other sites

On 4/4/2023 at 3:45 PM, SOLVE-SMART said:

Hi @avatar56,

I guess your target folder is incorrect. You need to add your specific user "C:\Users\UserAccountName\Documents\VirtualDJ\". Maybe that's all ๐Ÿคž .
Please try again with a user account or use this macro:

Local Const $sTargetFolder = 'C:' & @HomePath & '\Documents\VirtualDJ\'

Best regards
Sven

Where do I put this in the macro you suggested to me?
\license.dat

ย 

Edited by avatar56

Thanks from Avatar56

Link to comment
Share on other sites

Replace your line 68 (which miss one double quote sign):

FileCopy($sfldr1 & "\license.dat", "C:\ & @MyDocumentsDir & "\Documents\VirtualDJ\", 1)

with this:

Local Const $sTargetFolder = @MyDocumentsDir & '\VirtualDJ\'

FileCopy($sfldr1 & '\license.dat', $sTargetFolder, 1)

๐Ÿ’ก Notice: Now the macro @MyDocumentsDir is in use (better one ๐Ÿ‘).

Best regards
Sven

Edited by SOLVE-SMART

Stay innovative!

Spoiler

๐ŸŒย Au3Forums

๐ŸŽฒ AutoIt (en) Cheat Sheet

๐Ÿ“Š AutoIt limits/defaults

๐Ÿ’Ž Code Katas: [...] (comming soon)

๐ŸŽญ Collection of GitHub users with AutoIt projects

๐Ÿžย False-Positives

๐Ÿ”ฎย Me on GitHub

๐Ÿ’ฌย Opinion about new forum sub category

๐Ÿ“‘ย UDF wiki list

โœ‚ย VSCode-AutoItSnippets

๐Ÿ“‘ย WebDriver FAQs

๐Ÿ‘จโ€๐Ÿซย WebDriver Tutorial (coming soon)

Link to comment
Share on other sites

BTW: Please add meaningful titles to your threads. "a question" doesn't tell us much. You will get more replies when users see in the title what your problem is.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13ย - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28ย - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excelย - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

ย 

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...