Duplicate folder

Not sure if this is the best place to put this.  But I am writing a script to compile illustrator files, from a model of folder but cannot find a way to copy folder without having to open each file in illustrator first.  Below is a snippet of code that I found on the indesign scripting area that looks like it would work but get an error when you run it.  Can someone help me?  It is currently running applescript in I think there is no way to copy without using the finder.

var myFile = file ("' / users/ME/Desktop/CopyFile /" ");

var myFolder = file ("' / users/ME/Desktop/CopyTo /" ");

function {MoveFile (myFile, MyAccount)

If (File.fs == "Macintosh") {}

var myAppleScript =

"tell application"Finder"\r" +.

"move file POSIX" ' + myFile.fsName + ' "to the POSIX file" ' + myFolder.fsName + "" "with replacing\r' +"

"end tell\r".

app.doScript (myAppleScript, ScriptLanguage.applescriptLanguage);

}

If {(myMovedFile.exists)

Returns true;

}

else {}

Returns false;

}

}

MoveFile();

You can use the "copy()" of the File object method

// duplicateFolder.jsx
var sourceFolder = Folder("c:/temp/images"); // change to your own folder
var destinationFolder = Folder("/c/temp/images2"); // change to your own folder

function duplicateFolder (sourceFolder, destinationFolder) {

    var files = sourceFolder.getFiles ();

    for (var a=0; a 
         

Tags: Illustrator

Similar Questions

  • It seems that whenever I open a folder of photos, stored on my hard drive, a duplicate folder fits in my library of images from windows, which I don't want it to do.

    It seems that whenever I open a folder of photos, stored on my hard drive, a duplicate folder fits in my library of images from windows, which I don't want it to do.  (Windows 7 OS)

    Can anyone help?

    Thanks in advance.

    You go to + photos through libraries > photos?

    Where are you seeing any duplicate?

  • When importing duplicate folder

    I recently got a new Macbook Pro 13 "and upgraded to LR 6, I moved my library without problem but when I import photos into a folder LR creates a duplicate outside of the original parent folder folder."  I can't move the photos in the right folder, since technically they are already there! The pictures on my hardrive are in the correct folder, but LR creates just a duplicate folder name?  Help please!

    Hi jonathanb,.

    When you import the image in Lightroom, you must choose the Option 'Add' instead of copy.

    See the screenshot below.

    Let us know if that helps.

    Kind regards

    Mohit

  • Export add to this catalogue creates duplicate folder tree

    Under folders, I have the disc space (d) and then my folder structure. I take a picture for export and select "add to catalogue". LR creates a new Local (d) disk under folders with the file of the newly exported file. I use LR CC on Win7 64 bit.

    For those seeking a response.

    Depending on how you choose the destination folder under Export location in the export dialog box, it returns the drive letter in upper or lower case. It's tiny, LR then creates a new disk in the folder Panel.

    If I search a folder in the folder tree in the choose a folder dialog box, I get a capital letter (d), if I take one of the icons of folders in the right pane, or navigation bar, I get a drive letter of the lower case (d).

    Thanks to Tanuj composition in my computer and diagnose the cause. Thanks to Victoria to have the right idea.

  • Thunderbird accounts disappeared after having copied the .thunderbird folder in another folder for backup (always went after the removal of duplicates)

    Hello

    I copied the .thunderbird folder to another folder on my computer (Ubuntu on Dell Laptop) for back up, re-open Thunderbird: accounts all parties; asking me to set up an e-mail account. I deleted the duplicate folder, but Auditors have always disappeared when I restart (.thunderbird original file still in the original location).

    I tried to use the profile to find/reactivate Manager profile as suggested on the support page (creating a profile with my name instead of the random.default profile) online - but it did not work.

    I'm reasonably computer literate but not a developer/programmer normal language would be appreciated!

    Thank you.
    Adrian

    It me - confused things fixed which happened, but fortunately I have lay profile .default right in the end!

  • I can't delete a duplicate named folders created in error by Thunderbird while moving messages with drag and drop

    I had created a folder with a long as name "Deborah Brown - HP laptop acting, very slow, etc." this file was created to contain messages that have been received in a top-level folder, and then moved to this to the appropriate ranking related emails many. I had done many times before without a problem. But this time, when I slipped and fell on a message in the folder a double was created, but accompanied by an annex of '2547417' at the end of the name. IIRC, the message was in the records at the time of the original and a copy. IIRC, I did not notice this at first and when I dragged/left down another message he created another folder in double, but this time with the suffix "211613d". At any given time more far in the process (I don't remember quite well how) both of these files got duplicated again but this time were with the same name with added suffixes as noted... something I wouldn't have imagined. Given that the messages I was moving were safely (?) stored in the original folder, I deleted the message content duplicated records duplicated without any problem and without any effect on the content of the original file.

    Then I tried to delete the duplicate folders... not allowed. Then I noticed that if I tried to remove the second instance of each duplicate name, which was a success... at least as much as to move it to the trash. If I then returned and tried to delete the first instance it is, once again, not the law. I then tried to rename the files by adding a prefix a single character. Once more, if I worked on the second instance of the name I could rename it but would be foiled again if the first instance. Then, * I think * (extra large grains of salt here) is that I renamed the second instance and removed from the trash that I could then work on the others and rename and empty the trash.

    But everything for nothing. If I closed Thunderbird and restarted the duplicate folder names reappearing. Then I tried the fix given for not being able to delete messages because of a corrupt trash folder. That did not help either. Even if I use a POP account and could remove the files from the two basket my account information, whenever I would restart Thunderbird trash will reappear by himself and the so-called deleted duplicate files right with her and in the hierarchy of their original folder.

    I'm mystified and have given up trying to remove these things. Fortunately, the removal of messages from other folders and empty the trash of these messages seem to work normally. I have not yet tried to delete another folder and hesitate to do.

    Thank you
    Chuck Norcutt
    Murrells Inlet, SC

    Thank you very much. Exactly, that solved the problem. There was almost no delay in starting. I'm still very curious as to how it happened, but it may never be known.

  • Printer driver install resulted in double Program Files folder - how can I remove it?

    Trouble installing a lexmark printer driver led to a work folder lexmark Program Files (x 86) and a 2nd same lexmark folder in a new folder of C: drive called "Program Files (x 86) (x 86)".  Only lexmark files are in this new folder in program files.  Can find no specific uninstall script in the new folder.

    Can I just delete (x 86) 2nd (x 86) folder and lexmark all files it contains?

    The printer works now that the "Program files (x 86)" has been filled.

    My directories now looks like this:

    OPERATING SYSTEM (C :))

    Program Files

    Program Files (x 86)

    Program Files (x 86) (x 86)<= this="" is="" the="" apparently="" duplicate="" folder="" and="" contains="" only="" lexmark="" printer="" files="" (reviewed="" with="" 'show="" hidden="" files'="">

    If you will not be able to rename after reboot, you can try to boot your operating system in "safe mode" and rename the folder in "safe mode":

    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    LC

  • I have two folders in the same subdirectory with the same name. How to remove the extra folder?

    I have 2 directories "documents" located in the same directory. They are as well located in C:\Documents and Settings\ [user_name]------directory. Duplicate folder is automatically updated with the same file names when I add files in the original folder. It looks like a pointer to the original folder, when I try to delete the duplicate directory. I get the following error message.

    Can't delete My Documents: it is used by another person or program.
    Close all programs that might be using the file and try again.

    I deleted all files in the directory, rebooted the computer and attempted to delete the now empty folder and I get the same error message. Can you help me remove this duplicate folder.

    Note:
    ------

    I am not able to rename the duplicate folder... If I try to rename, the original folder is renamed... But not the duplicate. Also the duplicate folder becomes empty (since it runs a pointer to the original folder, when the double original of renowned gets is empty)

    Mager

    In Windows XP, all user folders were located under the C:\Documents and Settings folder.

    In Vista , all user folders are located under the folder C:\Users .

    Vista Documents and Settings folder is not a real file it's a junction folder that points to the Folder C:\Users.

    A junction is as a shortcut that points to another file, that is why these records have a shortcut (arrow) overlay icon. In Vista, the only reason why the Documents and Settings junction is for the old installers who are looking for a Documents and Settings folder. When they try to access the folder Documents and Settings, the junction in silence re - runs Setup to the C:\Users folder.

    The default permissions for the Documents and Settings junction is access denied, even for the administrators of .

    The only way that a user can access this file actually is if the access permissions have been changed.

    For a more detailed description of this topic and a list of all the junctions see the following Web site.

    Windows Vista Junction Points:
    http://www.Svrops.com/Svrops/articles/jpoints.htm

    I recommend that you move all your files and immediately stop using the Documents and Settings folder to avoid more problems.

    If this just started recently, I recommend that you use the system restore back to a point before the documents and settings folder was first access.

    Ronnie Vernon MVP

  • Files do not appear when searched, but they appear in the folder if you scroll to it.

    In our company, we have a few shared drives that host the majority of the companies files and folders. But in the past months, a subfolder don't like it when we try to search for recorded documents.

    In the folder there is a file called Medline SO # 46924, and when I find out of the 150 + items in the folder, I can click, open and view it. But when I go to the tab above search and type something like Medline, or THEN, or 46924 there is nothing.

    The last thing that appears in searches are components of the middle of November, and items are added daily in this folder. I am inclined to believe that is somewhat an indexing problem, and if so, I was wondering how this could be considered.

    Here are the most recent files in the folder.

    And as you can see. With the first, when I type in search 47624, who will present the good order of sale as our employees need to look at, there is nothing. And it goes back to almost two months now.

    I don't know if it's something that could be due to our file server. Or some settings somewhere. But she does it for all users.

    Thank you.

    If the problem persists with a duplicate folder and files saved in a place that is NOT indexed (for example in a new folder on the C drive, or on a USB stick), which would indicate that the problem is not just with indexing.  In any case, are you familiar with indexing settings and by looking at the index rebuilding?  This is standard advice to try to get the rebuilt index, if I can't say that he would always fix things.

    The parameters can be seen and changed in the indexing of the Control Panel Options dialog box.  To rebuild the index in Indexing Options, click Options Advanced, Rebuild, OK and wait a while.

  • I downloaded the discography of Bruce Cockburn, but duplicate and some files are empty files. How can I fix this?

    There are 15 albums that I tried to transfer the 'library of windows' to 'windows media player' on my PC, but the duplicate folder and some files were empty. What should I do?

    Hi David,

    There can be several causes for this problem which are preventable

    I suggest to follow the steps provided and we update on the State of the question.

    Method 1: Run the troubleshooters and check if the problem is resolved.

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-library-Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Method 2: If the problem persists, then clear the database of Windows Media Player. To do this, follow these steps:

    a. exit Windows Media Player.

    b. for Windows 7: click Start, run, %LOCALAPPDATA%\Microsoft\Media Player and then click on OK.

    c. Select all files in the folder, and then click delete on the file menu.

    Note: You don't have to remove the folders that are in this folder.

    d. restart Windows Media Player.

    Note Windows Media Player automatically rebuilds the database.

    Method 3: If this does not resolve the problem, disable the Windows Media Player database cache files. To do this, follow these steps:

    a. exit Windows Media Player.

    b. If you run Windows 7, click Start, run, % LOCALAPPDATA%\Microsoft, and then click OK.

    c. Select the folder Media Playerand then click delete on the file menu.

    d. restart Windows Media Player.

    Note: Windows Media Player automatically rebuilds the database.

    For all windows questions do not hesitate to contact us and we will be happy to help you.

  • How to move folders with unique to the folder with mutiple photos

    I am moving files with simple images to folders with several pictures in order to organize and to eliminate unnecessary files. I want to catalog them by folder name vs (dates, tags, etc...) I tried different things but am afraid I might lose a few pictures of my parents who are now deceased. I tried to drag and drop files, but then again I'm afraid I might lose photos. Thanks for the ideas or anyones help.

    Hello

    Thanks for posting the request in the Microsoft Community.

    I suggest you to refer to the article and see if it helps:

    Copy and paste a file

    http://Windows.Microsoft.com/en-in/Windows7/copy-and-paste-a-file

    Move and copy files using drag and drop

    http://Windows.Microsoft.com/en-in/Windows7/move-and-copy-files-using-drag-and-drop

    If you copy and paste the files, you will not lose any data. If you are afraid to do so, you can create a folder and copy all the photos and records in that particular place. Later, you can try to copy the file from its original location to the desired folder. After the transfer of files successfully, you can delete the duplicate folder.

    Let us know if it helps.

  • My images folder has changed to a double D:? Help, please! -windows - 7

    Hey there. I have a new computer (asus x53u) laptop and am running windows 7 Home premium, 64-bit version. Service Pack1. Anyway, fairly new to windows 7 and new on a partitioned hard drive! Currently, all my documents/videos etc. were stored on the C: drive, the same as my operating system. I was changing the location of my pictures on the D: drive. I did it by going to start, by clicking on my name, right click on photo and clicking Properties. I then went to the place. (this method has worked for others, such as video) I then clicked on 'move', then 'computer', then 'storage D: D: – once opened, when I would normally choose the duplicate folder, I created, in this case 'images'. However I clicked the button 'Select folder', without actually selecting a folder first. : 0 (so what was the 'images' folder has now transformed into "Storage D:" - when I click Properties, it turns out that my hard drive!) It says "type: local drive, file system: NTFS"- and of course shows the pie scale. I tried to revert to the situation and move them to the folder images duplicate, I created for her. When I click on apply he asks me if I want to move all the files to the new location. I click Yes and then get an error message reading: cannot redirect parent down. The specified path is not valid. I also tried clicking 'restore the default' on the location tab, click on apply, when asked if I want to move the files to the new location I select Yes, then get an error message that says: failure of the list of regular subfolders under "D:\MSOCache" Acess is denied. (I am the administrator on this computer)... Thank you very much for your help and your expertise, I looked everywhere trying to find a solution! Best regards, Brendan

    Hello

    You try to perform a system restore to restore the work correctly the settings, to do that follow the instructions below:
    a. Click Start, type system restore in the search box and then in the list click on the system restore program. If you are prompted for an administrator password or a confirmation, type your password or click on continue.
    b. in the System Restore dialog box, click on choose a different restore point and then click Next.
    c. in the list of restore points, click a restore point created before you started having the problem, and then click Next.
    d. click Finish.
    For more information, see this link below.
    System Restore: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/system-restore-frequently-asked-questions
  • Creating a folder structure to a defined location on your desktop of EI through the script?


    I wrote a script that creates a structure of folders in my opinion of AE project but I would then be able to run another script (possibly related to a button on a GUI Panel) which allows me to define where I can create a folder structure that is similar to my desktop or set the folder.

    Is there a way to do this?

    Thank you!

    Okay, I think I now have something that works. I tested it a little CC in 2014, but not him have really put it through the wringer. So use with CAUTION!

    It may not look pretty, but it works. The only things to know are that there is not currently a special auditor to avoid problems with name for the OS folder. The other is that if a duplicate folder name appears within the same parentFolder (see crude example below), it will be simply not created in the installation of the OS program. This prevents overwriting of files without warning.

    Example:

    What is AE...

    Folder 1

    Folder 2

    Folder 3

    Folder 4

    Folder 4    <-----Folder with="" a="" duplicate="">

    Folder 5

    Folder 4    <-----Folder with="" a="" duplicate="" name,="" but="" is="" unique="" to="" it's="">

    What is created in the BONE...

    Folder 1

    Folder 2

    Folder 3

    Folder 4

    Folder 5

    Folder 4

    Here is the code of function, just supply the type of an argument of an object file. This will be the new root folder to build your AE folder structure.

    var b = Folder.selectDialog("Choose a source folder.");
    
    if(b != null){
        aeFoldersToOSFolders(b);
    }
    
    function aeFoldersToOSFolders(newRoot){
        var proj, allItems, folderCollection, folderCollectionLen, curItem, val, win, userOS, slash, newCorePath, folderNames, folderAEPath, temp;
        win = $.os.indexOf("Windows");
        win != (-1) ? userOS = "PC" : userOS = "MAC";
        userOS == ("PC") ? slash = "\\" : slash = "/";
        function getItemParentPath(endItem, ary, slash){
              if(endItem == "undefined"){
                  return ary;
              }else if(endItem.name == "Root"){
                  if(ary.length > 0){
                        return ary.reverse().join(slash).toString();
                  }else{
                        return null;
                  }
              }else{
                  ary.push(endItem.name);
                  var newParent = endItem.parentFolder;
                  return getItemParentPath(newParent, ary, slash);
              }
        }
    
        proj = app.project;
        allItems = proj.numItems;
        folderCollection = new Array();
        temp = new Array();
        newCorePath = decodeURI(newRoot).toString();
        for(var i=1; i<=allItems; i++){
              curItem = proj.item(i);
              if(curItem instanceof FolderItem){
                  temp.length = 0;
                  folderAEPath = getItemParentPath(curItem, temp, slash);
                  if(folderAEPath != null){
                        folderCollection.push(newCorePath + slash + folderAEPath);
                  }
              }
        }
    
        folderCollectionLen = folderCollection.length;
        if(folderCollectionLen > 0){
              for(var f=0; f		   
  • Do I need all these pictures?

    I found a large collection of photos that also exist in my library of Photos. I have to keep? Disk inventory X seems to associate with the preview application. They consume considerable disk space. Here's a representative trace: C sets/FS-61371d92-a81a-44ed-b35e-4c455b7cb4f0/0A0C9AC1-EBBA-49AC-A810-918BA3ED7C0 David/Library/Containers/com.apple.cloudphotosd/Data/Library/Application Support/com.apple.cloudphotosd/services/com.apple.photo.icloud.sharedstreams/as.

    (1) this seems reasonable (duplicate folder names makes me wonder)? and

    (2) can be removed without disturbing the corresponding images in the library?

    TIA,

    David

    They are just files not associated with any program (not to mention the preview). So if you are sure that these are not the images that is with the help of pictures you can delete them.

    If this isn't the case, don't.

    FYI, the paths that you posted are traced storage iCloud, be careful what you remove.

    What 100 TB SSD you, I wasn't aware that it existed.

  • Unable to file to rename or delete files

    I can't the files to rename or delete files in the pictures folder.

    Property sheets I have all the rights (I am administrator).  When I try to delete, it apparently works and things is in the trash.  Even after the deletion of the Recycle Bin, a few hours later the folders and files are back again.  Rename simply translates into a duplicate folder.

    I now have about 40 GB of duplicate stuff that I can't get rid of.  I am a serious amateur photographer and this problem really begins to pain - by using the internal drive at a rapid pace;  the close also backup drives.

    I think the issue may have something to do with copying a 'Pictures' folder from a USB on the hot folder on the hard disk.  This USB key is now offline and offsite as a backup

    Alaa (WhizKid) and with your help, the problem is resolved.  Arrived to think of my comment above and had the Epiphany.  Now I feel really stupid, happy, but stupid.  Problem was that SecondCopy (one of my backup programs that runs automatically) due to an action that synchronized the folder with a backup disk every three hours.  Removed action and the problem at the same time.

    Thanks again.

Maybe you are looking for

  • It corrects the massive slowdowns

    It corrects the massive downturn that began when I installed El Cap. My iMac went to a crawl every click I did. Incredible. IMAC 27 inch end 2013. 10.11.5 (15F34)

  • PIXMA iP90 - "Windows does not ' and 'Out of paper '.

    Hello. I just installed a Pixma iP90 on Windows 7 Pro x 64 computer.  The printer is old, but lightly used. I bought it for the trip in 2006, and since his last in 2007 (!) print job, the printer has been safely stored. Installation on Windows 7 Pro

  • How you disassemble a secondary HARD drive after boot?

    Vista SP2 If a secondary spare hard drive is installed and used for backups only, how only prevents editing during the boot process? I don't want this available until volume wherever I actually backup, in order to avoid the possibility of a virus att

  • Files corrupt Word - Help!

    I have a Word document saved on a USB key. When I tried to open it, I got the message "the file could not be opened because there are problems with the content". When I click on details, the message "the file is corrupt and cannot be opened" appears.

  • Can upgrade you Windows 7 Professional to Windows Home 10?

    I have a computer with Windows 7 Professional installed and I am wanting to upgrade to Windows 10 Home. Is this possible with the free update or am I stuck with Windows 10 Professional?