One file to two different folders simultaneously?

Is there a way to copy one file to two different folders simultaneously?
Maybe a script?
Drew

Thanks for the response Baltwo.
Maybe I shouldnt have said 'simultaneously'.
What I'm trying to achieve is this.
I drop a file into one folder and it automatically copies to ano folder (a redundant back up of the first folder)
Is that possible at all?
Drew

Similar Messages

  • Save different Objects in one file by two different streams

    Hi all,
    I have a issue to read two Objects from one file if I write those in two different streams.
    I open the ObjectOutputStream and save an Object to the file. Then I close this stream and file. Then I open the new ObjectOutputStream and save the second Object in the same file. It works Ok. Then I open the ObjectInputStream and try to read those two objects and get java.io.StreamCorruptedException.
    This exception happes only when app tryes to read the second Object.
    this is the code example:
    //Write part
    for (int i=0;i<2;i++)
    File file = new File("test.swp");
    FileOutputStream fileOut = new FileOutputStream(file,true);
    ObjectOutputStream objOut = new ObjectOutputStream(fileOut);
    JobObject jobObj = new JobObject();
    jobObj.setID(i);
    objOut.writeObject(jobObj);
    objOut.flush();
    objOut.close();
    fileOut.close();
    //Read part
    FileInputStream fileOut = new FileInputStream("test.swp");
    ObjectInputStream objOut = new ObjectInputStream(fileOut);
    for (int i=0;i<2;i++)
    JobObject jobObj = (JobObject)objOut.readObject();
    objOut.close();
    fileOut.close();
    Thank for any help.

    Maybe try closing the ObjectInputStream (and re-creating it as needed) within your for loop?
    - Saish
    "My karma ran over your dogma." - Anon

  • Dreamweaver won't open same file in two different folders.  Fix or switch to Aptana?

    Same file copied between 2 folders. DW will open one but not the other.  Copied code from 'good' file to new file; saved in 'bad' folder.  DW opened the file once then the spinning wheel of death again.  All files open in Aptana, Coda, Sublime no problem.  'Bad' file was coded and FTP's previously without problem.  Was annoyance previously but not the problem is becoming acute.  'Bad' file opens on Windows7 with DW8; won't open on MAC CS6.  Tried every fix posted; still POS.

    BTW - this has been a problem for years (plural).  I just had accepted that DW did this sometimes.  I write a lot of PHP so DW is not my primary software.  Couple of days ago, I was doing a customer presentation and it did it again.  MY mistake was I copies the development folder to a new folder and upload/took the approved site live.  Literally, I could navigate back to the old folder and open index.php but it would not open in the new folder.  Copied the old contents to the new folder/file, saved it, opened it and it worked fine.  This whole time I am tap dancing in front of a room full of people.  Go back to reopen the file and no go.  As my face slowly turns bright red, I navigate back to my development folder to open index.php.  Surprise, now it won't open either.  Luckily for me, I had a copy of Coda2 on my laptop, switched over and sold the job.  I mainly use DW for customers where I can split screens - use an 80" presentation screen - for convenience.  Was thinking about upgrading from CS6 but 4 and 5 had the same problems which was why I went to 6.

  • I recently deleted many duplicate files. In the midst of it my Itunes songs are not in Itunes. They are in two different folders. One under 'Music' in my ID. And two under a MyMusic file in Documents. How do I know which one to import?

    I recently deleted many duplicate files. In the midst of it my Itunes songs are not in Itunes. They are in two different folders. One under 'Music' in my ID. And two under a MyMusic file in Documents. How do I know which one to import?

    Thanks, this is not an ideal answer but probably the most sensible one in my case.
    I will try it unless someone has a better suggestion, but I'll wait a bit as it will take me a few days anyway (I had actually tried to create a new smaller playlist or download by album, but at this stage the music app is not letting me queue a list of songs for download - I think I will have to disable and re-enable iTunes match which will probably delete all the songs).
    I have to say I am not very impressed with Apple here - having an online backup of all your data and beeing able to restore it to a new device easily was a strong selling point of iCloud. For music, they are Definitly not delivering at the stage.

  • I only want itunes to hold the lossless files which are in two different folders. How do I do that?

    I have thousands of MP3 files which I no longer use and which are in my itunes library.
    I want itunes (version 11) to have in it's library only the MS Lossless format and the ALAC lossless format which are in two different folders. How do I achieve this?

    Delete the files you don't want, or cut & paste them to an alternate location if you want to archive them.
    What MS Lossless format? .wav?
    iTunes doesn't have any custom organization features, but you can change the location of the media folder and then selectively consolidate content to the new folder. This creates copies so you have to manually delete the originals. Alternatively I have a script called ConsolidateByMoving which does what it suggests. Thiis could be used to split the media into parallel subfolders within your existing media folder if you disable iTunes "Keep iTunes Media folder organized" option.
    tt2

  • Using Berkeley With Two Different Environment Simultaneously

    I am trying to use Berkeley with two different environment simultaneously in one program. But I am getting an error message of Databases left open. The first environment close with no error but the 2nd environment, having an error like this,
    Exception in thread "main" java.lang.IllegalStateException: Unclosed Database: element_primary_key_index\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
    Unclosed Database: class_catalog\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
    Unclosed Database: element_database\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
    Databases left open: 3
         at com.sleepycat.je.Environment.close(Environment.java:383)
         at com.svi.tools.gfs3v10domain.database.GFS3v10ReadWriteDatabase.closeUpload(GFS3v10ReadWriteDatabase.java:155)
         at com.svi.tools.gfs3v10domain.GFS3v10Domain.closeReadWrite(GFS3v10Domain.java:160)
         at com.svi.tools.gfs3v10.util.GFS3v10UploadUtil.closeUpload(GFS3v10UploadUtil.java:97)
         at com.svi.tools.gfs3v10.GFS3v10.closeUpload(GFS3v10.java:115)
         at com.svi.tools.gfs3v10uploader.util.Uploader.uploadFiles(Uploader.java:89)
         at com.svi.tools.gfs3v10uploader.GFS3v10Uploader.mainMethod(GFS3v10Uploader.java:109)
         at com.svi.tools.gfs3v10uploader.GFS3v10Uploader.main(GFS3v10Uploader.java:52)
    Please someone help me with my problem. Thanks in advance.

    Hi Mark,
    Here is my sample program for the problem:
    import java.io.File;
    import com.sleepycat.bind.serial.StoredClassCatalog;
    import com.sleepycat.je.Database;
    import com.sleepycat.je.DatabaseConfig;
    import com.sleepycat.je.Environment;
    import com.sleepycat.je.EnvironmentConfig;
    import com.sleepycat.je.EnvironmentLockedException;
    import com.sleepycat.je.SecondaryConfig;
    import com.svi.tools.gfs3v10domain.objects.GFS3v10DomainElementData;
    import com.svi.tools.gfs3v10domain.objects.GFS3v10DomainElementKey;
    import com.svi.tools.gfs3v10domain.views.utils.ElementByPrimaryKeyCreator;
    * Read Write Database used for every thing else.
    public class MethodsSample implements GFS3v10Database {
         * Environment where the Database resides.
         private Environment environment = null;
         private boolean isClose = false;
         String environmentString;
         * Class Catalog for Stored Classes.
         private static StoredClassCatalog classCatalog;
         * Element Database.
         private static Database elementDatabase;
         * Element Database by Primary Key.
         private static Database elementByPrimaryKeyDatabase;
         private static Database catalogDatabase;
         * Default Constructor.
         public MethodsSample() {
    * Alternate Constructor.
    * @param homeDirectory Location where the Database is Located.
    public MethodsSample(String homeDirectory) {
         environmentString = homeDirectory;
         openEnvironment(homeDirectory);
         openDatabase();
    @Override
         * Opens the Read Write Database.
         * @param homeDirectory Location where the Database is Located.
    public void openEnvironment(String homeDirectory) {
         EnvironmentConfig environmentConfig = new EnvironmentConfig();
    environmentConfig.setTransactional(true);
    environmentConfig.setAllowCreate(true);
    environmentConfig.setDurability(DURABILITY);
    while (environment == null) {
         try {
              environment = new Environment(new File(homeDirectory), environmentConfig);
         } catch(EnvironmentLockedException ele) {
              try {
                             Thread.sleep(500);
                        } catch (InterruptedException e) {
    @Override
         * Opens the Database.
    public void openDatabase() {
         DatabaseConfig databaseConfig = new DatabaseConfig();
         databaseConfig.setDeferredWrite(true);
    databaseConfig.setAllowCreate(true);
    catalogDatabase = environment.openDatabase(null, CLASS_CATALOG + environmentString, databaseConfig);
    classCatalog = new StoredClassCatalog(catalogDatabase);
    elementDatabase = environment.openDatabase(null, ELEMENT_DATABASE + environmentString, databaseConfig);
    SecondaryConfig secondaryConfig = new SecondaryConfig();
    secondaryConfig.setDeferredWrite(true);
    secondaryConfig.setAllowCreate(true);
    secondaryConfig.setSortedDuplicates(true);
    secondaryConfig.setKeyCreator(new ElementByPrimaryKeyCreator(classCatalog, GFS3v10DomainElementKey.class, GFS3v10DomainElementData.class, String.class));
    elementByPrimaryKeyDatabase = environment.openSecondaryDatabase(null, ELEMENT_PRIMARY_KEY_INDEX + environmentString, elementDatabase, secondaryConfig);
    @Override
         * Gets the Environment.
         * @return Environment.
    public Environment getEnvironment() {
         return environment;
    @Override
         * Gets the Class Catalog.
         * @return Class Catalog.
    public StoredClassCatalog getClassCatalog() {
         return classCatalog;
    @Override
         * Gets Element Database.
         * @return Element Database.
    public Database getElementDatabase() {
         return elementDatabase;
    @Override
         * Gets Element By Primary Key Database.
         * @return Element By Primary Key Database.
    public Database getElementByPrimaryKeyDatabase() {
         return elementByPrimaryKeyDatabase;
    @Override
         * Closes Database and then Environment.
    public void closeUpload() {
         System.out.println("1st Jar environment closing = " + environmentString);
         elementByPrimaryKeyDatabase.close();
         elementDatabase.close();
         classCatalog.close();
         catalogDatabase.close();
         environment.close();
         isClose = true;
    public Boolean isClose() {
         return isClose;
         @Override
         public void closeOthers() {
    for the Main:
    public class sample {
         public static void main(String[] args) {
              String environment1 = "\\\\192.168.160.184\\glassfish\\berkeley\\environment\\home\\Multiple\\Testing11";
              String environment2 = "\\\\192.168.150.211\\glassfish3\\Berkeley\\environment\\Testing11";
              openCloseEnvironment(environment1, environment2);
         public static void openCloseEnvironment(String environment1, String environment2) {
              MethodsSample forEnvironment1 = new MethodsSample(environment1); //Opens the Databases
              MethodsSample forEnvironment2 = new MethodsSample(environment2); //Opens the Databases
              forEnvironment1.closeUpload();
              forEnvironment2.closeUpload();
    // same error happens no matter what sequence for closing
    Thank you.

  • Is there any way to scroll two different documents simultaneously?

    Hi all, scroll two different documents simultaneously  - it will be helpul while doing corrections / checking documents. Is there any plugin available for this?

    I use two computers (don't laugh). I set up the laptop next to my desktop monitor and use one hand on each keyboard.
    Consider using (if appropriate) compare tools as well. You can export both documents to RTF and use Word to compare them if all you care about is textual differences. You can export both documents to PDF and use Acrobat to compare them if you need to see graphic differences as well.
    Ken

  • HT204053 Two different accounts simultaneously on my apple tv?

    Can I use two different accounts simultaneously on my apple tv? (one for iCloud and one for iTunes store)

    Welcome to the Apple Community.
    If you mean for redownloading content such as TV shows etc, then no because this is controlled by your store settings.

  • Automatic Deployment Rule - One ADR for Two Different Collection for Two Different time Intervals

    I have a scenario where two collection of Windows 8.1 is made based on geographical location. One collection is for all the windows 8.1 machines in India and one collection is for all windows 8.1 machines in US. Now I have created one ADR to be deployed
    to the Collection for Machines in India with a schedule.
    My requirement is that can i use the same ADR for those two collection with different schedule. Say I want ADR to be deployed in India at say 10:PM IST and for US collection at say 10:00 PM PST.
    Can I use one ADR with two different schedule and can be deployed to two different collection. Any help will be greatly appreciated.
      

    Couple of "bits" to help you one your patch automation quest:
    A ADR is very much a 1:1:1 rule.  It creates (or updates) ONE update group, deploys it to ONE collection, and you can provide ONE schedule.  While you are more than capable of flipping said deployment time to use local time instead of UTC, in general
    it's a very simple set of rules that are dogmatically run.
    That said because of the "include" feature of collections it's not that hard to setup a good/robust patching pattern.  What I recommend doing is building an ADR for each variance of deployment of patches or enforcement time.  for example,
    my ADRs look something like this:
    Software Updates - Zero day enforced
    Software Updates - Critical and Security 1 month enforced
    Software Updates - Critical and Security 1 month no reboots
    Exact terminology is up to you of course, but I find a good descriptive ADR name saves a lot of confusion.  For each ADR I create an identical collection.  From there I can use existing collections and a simple "include collection" rule
    to bundle things up and make them part of the patching schedule of my choice.  Anyone can now go into my "software update" folder, look at my collections, and know exactly what gets patched by what deadline.
    Finally, don't be afraid to look into maintenance windows to trim down ADR count.  Making a deployment available for a month before it goes enforced, then setting up groups of maintenance windows (one for each Friday of the week for example) can also
    accomplish a similar goal by having machines auto-patch during their week but you only using one ADR.
    So by having two "types" of collections to manage your patching (one to assign a ADR built by deployment deadlines, the other for exact update windows) you should be able to group most your workstations into a decent patch scheudle without being
    too excessive about creating a billion ADRs.

  • How does one set up two different iTunes accounts on the same computer so that they do not merge into one?

    How does one set up two different iTunes accounts on the same computer so that they do not merge into one?

    mparker402 wrote:
    So, when the other iTunes account needs to be used, I should log out of Windows and have the other user log in under a different Windows account, correct?  
    M Parker, 
    Yes, since you are trying to keep things separate, that is exactly what you would do.

  • How to sync files from two different subscriptions in two different CC desktop folders

    HI,
    I have two CC subscriptions, one for work and one personal. I ran the work subscription in two computers at work and at home (when I need to work from home.) The problem  I find is that there is not two different CC folders for each subscription. When I log out from my work subscription, all my files for that subscription go away. Then when I log in again, they whole syncing process starts all over again. I chose to have two different subscriptions so not to mix my personal work with my work's. Is there a way to have a CC folder on my desktop for each subscription? In this way, when I log out from one account and go to the other the files of the account I just logged out don't get replaced for the files of the account I  just logged in.  Any help with this will be greatly appreciated.

    Hi,
    I just want to let you know what you should be seeing when using 2 accounts.
    Account one:
    1. Log in with Adobe ID for account one
    2. Files sync to Creative Cloud files which is located in your home directory on Mac or Windows.
    3. Log out of account one, Creative Cloud now displays the log in panel.
    Account two:
    1. Log in with Adobe ID for account two
    2. Files sync to account 2's Creative Cloud files which is located in your home directory on Mac or Windows. (Account one's Creative Cloud Files folder is re named)
    Thing to check for are:
    After you logged in to account two, the Creative Cloud folder for account 1 should now be renamed, can you check this please to make sure it has.
    The same is true is you log back in to account one, account two's Creative Cloud folder will be renamed.
    The data should not have to fully re-sync ever time you log out of account 1 and then into account 2, however, can you be sure that the data is actually re downloading. ie; you had 5GB of data in account one and when you log into account 1 the whole 5GB of data is re downloading?, could you check this?
    The Creative Cloud files panel will display "Syncing" for a short while is you switch accounts, this is normal and means the application is reading data on disk and data on the server checking for changes/added files etc. This is not re-downloading all of your data, it is simply checking.
    You are able to move the Creative Cloud files folder to any location on your local hard drive via the Creative Cloud prefs.
    Thanks
    Warner

  • Can you move files between two different user accounts in Time Capsule?

    I copied a bunch of stuff from my old NAS (which used FAT) to Time Capsule under one user account... I then reformatted the NAS to HFS+ so I could just use it as a USB drive connected to the TC. Now I realized that I want to have one of those folders in another user directory. I cannot open two different sessions of the TC on the computer...at least I have not figured out how to do this. Is there a way to accomplish this without copying the folder to my computer, then copying it back to the other user directory? It is several gigs.

    you can crop files from one account to another using the Public Dropbox which every user account has.  Log into the user that has the files you want to move, then drag the folder you want to the new users' dropbox:
    I suggest a small scale test on a few files first before moving gigabytes of files.

  • How to split one monitor into two, differently configured desktops

    Hello,
    I have a 27" iMac. I would like to split the screen into two differently configured desktops or monitors. Apps like TwoUp or Divy don't exactly do this. I'll explain it with an example:
    Suppose I'm working on a document and I need to open many folders to retrieve files. One common problem is that opened folders overlap each other and sometimes they overlap with the document I'm working on, or they go underneath the document. I would like to split the screen vertically in, say, two virtual, independent desktops/monitors, like this:
    - one window/space on one side (say, on the left) of the screen would contain the document  from top to bottom, with no dock bar on the bottom
    - the other window/space (right) would behave as a regular, full desktop, with the entire dock on the bottom
    In this way, if I need to navigate to find a file to use in the document, I would move the cursor to the right. The Finder would work only in this window/space, thus windows or other applications would never overlap or clutter the left side of the screen. Drag-and-drop from right to left should be possible.
    One way to imagine it is as if the 16x9 monitor were comprised by two vertical, 8x9 independent monitors side by side, each with its own configuration.
    Is this possible? Can anyone recommend an application or type of setup?
    Thank you,
    -celso

    Looking for something like this?
    You can tell Display Maid to save the positions of your open windows across many apps and later restore those positions when things become a mess. With Display Maid you don’t have to restore windows one at a time, or even one app at a time. Display Maid restores all saved window positions across all apps with one command. It will also restore window positions automatically when it detects a workspace change.
    http://www.funk-isoft.com/index.php/display-maid

  • Compiling multiple java files present in different packages simultaneously

    Hi,
    I have multiple java files which are present in different folders.
    In some cases, files are importing classes from other packages i.e. some kind of inter-dependency
    How do I compile these java files simultaneously?
    Any help would be highly appreciated.

    Pawan_Anand wrote:
    Hi,
    I have multiple java files which are present in different folders.
    In some cases, files are importing classes from other packages i.e. some kind of inter-dependency
    How do I compile these java files simultaneously?
    Is it circular?
    Thus the dependency is A => B => C => A?

  • Comparing photos from two different folders...

    Is there a way to have side-by-side two images from different folders? Say, one from 2008 and one recent?  Lightroom 3.6...

    Sure. In Grid mode, select the two folders that the images reside in. Click on the first folder and Ctrl-Click (on PC) on the second. Then find and select the two images in the Grid. Then invoke the compare feature.
    Hal

Maybe you are looking for

  • Error code: 12017 (nokia asha 200)

    i cant update my phone's software. nokia asha 200.

  • How do i get information about my dreamweaver account?

    my computer has been trashed by a hacker.  all programs unworking, a lot of my other info not available.  i need to get info from adobe about my account or accounts with them.

  • What is an alternate to Thread.Sleep()?

    What is an alternate to thread.sleep? The reason being, my action listener won't let me throw exceptions so I need an alternative to thread.sleep, anything?

  • How to move move and link FCPX music files?

    The Library/Apple Loops/... file is now over 30GB, leaving very little overhead on my system drive.  I would like to move this whole directory to a second internal drive and link FCPX to that location.  Haven't found a way to change the folder link i

  • Unrecognized I18N key:

    I tried out the Sun Update Connection web interface. Seems neat, but I'm get the following error message for every patch I try to install this way: Unrecognized I18N key: "swup.server.smpatch.". Please contact Sun Support for comment explanation I in