Copy & rename entire folder structure

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Copy & rename entire folder structure

    I was wondering how to copy an entire folder structure with sub folders and
    files, then rename the main folder. I have used the cfdirectory to 'rename'
    the directory, but that's only after I manually coppied or FTP the folder
    structure. I want to use cf to both copy the folder structure and then rename
    it. Ex. original folders ---> [Family][mom][dad] (1 main folder with 2
    sub folders) copy/rename to ---> [Johnsons][mom][dad] (still 1 main folder
    with 2 sub folders) Man, I really hope that made some sense.

    skooter Guest

  2. Similar Questions and Discussions

    1. rename file and/or folder
      I am a web developer and have several clients who I have just started on Contribute. Already we are all very frustrated over the limitation of...
    2. Quick way to rename text boxes when copy/paste
      Hi Folks, I am trying to add text boxes to document. I did see that I can copy and paste, but it leaves the name the same. Then when you add text to...
    3. Copy File and Rename
      I need to copy about 200 files from one directory to another while renaming them. Does anyone have a short script to do this? TIA
    4. #25555 [NEW]: rename/copy/fopen should be able to handle uploaded
      From: xuefer at 21cn dot com Operating system: all PHP version: 4.3.3 PHP Bug Type: Feature/Change Request Bug description: ...
    5. Rename Folder
      For some reason, when I renamed a folder, it didn't update the image links within that page. Does anyone have any suggestions?
  3. #2

    Default Re: Copy & rename entire folder structure

    Use cfExecute to execute DOS-commands:

    <cfexecute name="cmd.exe"
    arguments="/c ren Family Johsons "
    timeOut="15"></cfexecute>

    ren Family Johsons
    is the actually executed command, "ren" is the command, "Family" the old name,
    "Johnsons" the new name.
    You'll have to use absolute paths instead of just "Family" or "Johnsons"

    Hope it helps
    Stefan K.

    Stefan K. Guest

  4. #3

    Default Re: Copy & rename entire folder structure

    Is there a way to do the copy of that folder structure before I rename it? Are there some similar DOS commands to copy a structure?
    skooter Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139