avatar56 Posted April 4, 2023 Share Posted April 4, 2023 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 More sharing options...
SOLVE-SMART Posted April 4, 2023 Share Posted April 4, 2023 (edited) 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 April 4, 2023 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 More sharing options...
avatar56 Posted April 4, 2023 Author Share Posted April 4, 2023 Thanks for your help.๐ Thanks from Avatar56 Link to comment Share on other sites More sharing options...
avatar56 Posted April 5, 2023 Author Share Posted April 5, 2023 (edited) 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 April 6, 2023 by avatar56 Thanks from Avatar56 Link to comment Share on other sites More sharing options...
SOLVE-SMART Posted April 5, 2023 Share Posted April 5, 2023 (edited) 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 April 5, 2023 by SOLVE-SMART avatar56 1 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 More sharing options...
water Posted April 5, 2023 Share Posted April 5, 2023 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. avatar56 1 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 More sharing options...
Skysnake Posted April 8, 2023 Share Posted April 8, 2023 Try like this to see where you are going: ConsoleWrite("@WorkingDir " & @WorkingDir & @CRLF) ConsoleWrite("c: @ScriptDir SomeFolder\SubFolder " & "c:" & @ScriptDir & "SomeFolder\SubFolder" & @CRLF) ย Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now