SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jul 2001
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SYS_COPY_FILE Problem

    I need to copy all the files located in a directory so i tried to use sys_copy_file with the path c:\Test\*.*
    I tells me that there is no such file or directory.It is there because i am able to copy 1 file from the same directory.Will i have to copy on file at a time I have to copy 23 files it might be messy.Any one got a solution???

    ------------------

  2. #2
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SYS_COPY_FILE Problem

    You can't use wildcards with SYS_CopyFile().
    Create a list of the files in the dir using SYS_GetDirContents() then use a "for each" loop to copy the individual files. Use this to write your own function SYS_CopyDirContents().

    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SYS_COPY_FILE Problem

    SYS_CopyFile only copies one file at a time and cannot accept wildcards. See the attached e-mail for a little more powerful function that will allow copying multiple files at once.

    Note: It will also overwrite any destination files that already exists, something that SYS_CopyFile will not do. In fact, SYS_CopyFile will raise an error if the destination file already exists.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:43 AM.

Copyright BetaSoft Inc.