Script for XCOPY files to flash drive

I'm trying to make a batch file to copy all %localuser% folders on an agent's laptop, including a few other directories inside appdata  to a flash drive and have it prompt for the drive letter of that flash drive then prompt to make a directory to copy
the files/folders to.  The idea is to copy all these directories without having to go in and browse to all these folders every time I want to back up and move an agent's stuff to a new computer.  Would also be great to have the same batch reverse
the copy on the new computer.  
Any help would be much appreciated.

XCOPY is a system utility and not a script. Just follow the help to get it to copy. Post your questions about XCOPY in the platform forum.  You should also search for articles on using XCOPY and ROBOCOPY.  RoboCopy has a simple file that tells
it what to do.  Search fro posts on RoboCopy.
¯\_(ツ)_/¯

Similar Messages

  • Need script for moving files to specific directories base on csv

    Hi,
    I have a question. I have about 2000 files (pdf), which I need move to specific directories and subdirectories, which are based on csv file.
    Csv is looking like this:
    filename;directoryname;subdirectoryname;subdirectoryname;.......etc.
    I have a script for creating directories with subdirectories from csv file, but I need this script for moving files to this directories.....
    Thanks a lot for every help.
    Best Regards
    Petr, OS X Mavericks

    private function snapshotLastFrame():void
    gotoAndStop( this.totalFrames );
    _bitmapData                         = new BitmapData( stage.stageWidth, stage.stageHeight );
    _bitmap                              = new Bitmap( _bitmapData );
    _bitmapData.draw ( stage );
    saveImageJPG( _bitmapData, "test.jpg", 96 );
    public function saveImageJPG( bitmapData:BitmapData, fileName:String, quality:int ):void {
                this.jpgEncoder = new JPGEncoder( quality );
                this.fileReference = new FileReference();
                this.fileReference.save( this.jpgEncoder.encode( bitmapData ), fileName + ".jpg" );
    Keep in mind that you need a few extra libraries to be able to create a jpeg.. (AS3CoreLib) can be found at googleCode.

  • Down load files to flash drive/ mac book

    down loading music files onto flash drive so they are aranged the same as music library

    OK. I did.
    But here is the problem, it still doesn't save certain file on the flash drive. Most of the files are either jpg.,cwk.,pdf., or mov.
    The mov. won't even play. It works fine when i save files from a windows computer, but not when i save from my mac.
    I really have no idea why its doing this. I am aware that certain file can't be opened from a mac to a window, but i just don't know why, when i place a file into the flash drive icon and try to re-open it, it says the error message again (On my mac).
    Thanks.

  • Using Automator and Applescript to search and move files to flash drive

    I've used applescript and automator to do simple tasks like watch folders and move files and rename files, but that is about the extent. I am wondering if it is possible to set up a automator service or app that will do several things.
    When a flash drive is plugged it, it will ask for a file to be searched for, then it will search a predetermined directory for files with the word or number in them and then it will copy the found files to the mounted flash drive.
    Any help would be greatly appriciated!
    Thanks!

    As a start, you can use launchd to run a script when a volume is mounted:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>Label</key>
              <string>com.tonyt.LaunchOnVolMount</string>
              <key>ProgramArguments</key>
              <array>
                        <string>LaunchOnVolMount.sh</string>
              </array>
              <key>QueueDirectories</key>
              <array/>
              <key>StartOnMount</key>
              <true/>
              <key>WatchPaths</key>
              <array/>
    </dict>
    </plist>
    You can then have the LaunchOnVolMount.sh script perform the tasks you need.
    You can incorporate Applescript within the Bash script with osascript:
    #!/bin/bash
    answer=$( osascript -e 'tell app "System Events" to display dialog "What file do you want to search for?" default answer "" ' )
    echo $answer
    I beleive that you can also call an Applescript from launchd

  • Copy/Save file to flash drive

    I am trying to create a script where the user can initiate a
    download/Save/copy of a stored file from my HDD to a flash drive.
    It would seem that baCopyProgressFile would be ideal for this
    situation, but I am authoring on a Intel MBP and it does not appear
    that Buddy API is compatible with Intel Macs at this time. I only
    need this projector to display on this MBP (this is really just a
    quick proof of concept project that will be run locally), so any
    suggestions or alternatives would be very helpful. Thanks.

    > By main directory, I mean the directory where the
    director project resides. I
    > would like to copy a movie from this directory to the
    root of the flash drive
    > directory.
    I'm still not understanding you. You want to copy a file from
    the
    directory where the projector is, or a sub-directory?
    If you want to copy from a sub-directory, try something like:
    on mouseUp me
    tSource = "@/movies/480p.mov"
    tDest = "/Volumes/bb/480p.mov"
    OK = baCopyFileProgress(tSource, tDest, "IfNewer", "Copying
    Movie to
    disk...", "Cancel", 0)
    if OK <> 0 then alert string(OK)
    end
    > I updated the code with yours, and now when I run the
    movie, it gives me an
    > error stating:
    > Script error: String expected
    > Alert OK
    > 5
    My mistake. I assumed that when you use 'alert' whatever you
    are
    alerting is auto-cast to a string. Try the above instead.
    > If I adjust the code so that it copies the file from the
    projects directory
    > and pastes it into the same, then the file will copy
    with the progress bar and
    > after the copy is complete it gives me the same error
    message as above, only
    > with a '0' instead of a 5.
    If you look in the docs for Buddy API, 0 means the operation
    succeeded
    and 5 means "Couldn't create directory for Dest file"
    (suggesting your
    destination path is incorrect)
    Since you already use Buddy API I suggest you use a
    combination of
    baDiskList() and baDiskInfo(disk, "type") to determine which
    is your
    Flash drive and then use that disk as your root for copying.
    For example:
    on mouseUp me
    lDisks = baDiskList()
    lTargets = []
    repeat with aDisk in lDisks
    if baDiskInfo(aDisk, "type") = "Removable" then
    -- found (potential) target
    lTargets.append(aDisk)
    end if
    end repeat
    case count(lTargets) of
    0: -- no removable drives available to copy to
    alert "Drive not found"
    1:
    tSource = "@/movies/480p.mov"
    tDest = lTargets[1] & "480p.mov"
    me.mCopyFile(tSource, tDest)
    otherwise:
    -- more than one removable drive available
    -- you'll need to create a routine to determine
    -- which one you want to copy to, or present the user with
    -- a selection they can choose from
    end case
    end
    on mCopyFile me, aSource, aDestination
    OK = baCopyFileProgress(aSource, aDestination, "IfNewer",
    "Copying
    Movie to disk...", "Cancel", 0)
    if OK <> 0 then alert string(OK)
    end

  • Music files from flash drive to new itunes

    ive been slowly transfering music from my old PC to a music library on my MBP.  the weird thing is that on a fair number of folders, when they transfer, some songs seem to get left behind and not copied.  i'll have an album with 11 tracks, and move it as usual to the flash drive, then when its gets loaded onto the mac three or four of them are gone.  i must be really behind the times, because i cant fathom the file allocations that itunes uses.  ill load the batman begins soundtrack folder into the music folder, and it will split it into to two separate files - one with the original folder title and another with the artist listed and consolidiating them manually doesnt work.  it just resplits the **** thing - am i still to PC-if-fied?

    andyrh68 wrote:
    my itunes library information has gone for good
    ... unless you have a backup copy of your *iTunes library file*. do you use time machine or any other means of backing up ?
    What is the easiest way to link the now newly installed itunes to these external files?
    if the answer to above question is no, you will have to start from scratch, i.e. no playcounts, ratings, playlists, etc. from your old library will be there.
    assuming you have *copy files to ... when adding to library* checked in preferences > advanced, option-drag the folder containing your media files into an open iTunes window. iTunes will index the path to the location of the original files, but won't copy them physically.
    btw, pointing *iTunes media folder location* to another spot will only tell iTunes where to put newly added content, not where the current content is.
    JGG

  • How can I recover files from flash drive?

    I've apparently lost a bunch of '.pages' files on a 16GB Lexar flash drive that were present yesterday.  The '.pages' files were contained in a sub-folder.  The main folder is still there and apparently okay.  I am at a total lose as to where the files (and their sub-folder) have gone to.  Any suggestions on a program or procedure to try to see if they're still there and recoverable?  Any guidance will be GREATLY appreciated!  Thanks! 
    I have a MAC Mini (Mid 2010), Mac OS X (10.6.8), 2.4 GHz Intel Core2Duo 8GB mem.
    If I've selected the wrong community to post this question to, please help me find the right one.  Thanks, again!

    Peter,
    Thanks for suggesting Disk Utility.  I didn't know it existed, but found it and ran it.  I checked 'Verify Disk' and it "Found 335234 orphaned clusters, 25174 files, 6428792 KiB free (803599 clusters)"  And, then responded (in Red) "Error: This disk needs to be repaired. Click Repair Disk."
    After I checked "Repair Disk" it responded: "Volume repair complete. Updating boot support partitions for the volume as required."
    After then checking the flash drive the 'lost' folder and files are still not present.
    I've been looking on the WEB for 'recovery programs' for MAC.  I'd just as soon find a 'free' application, but would consider purchasing a program if it would work.  What do you know about these 'recovery programs':
        http://www.wondershare.net/ad/data-recovery-mac.html?gclid=CKuo48CPn8ICFY_m7Aodx jYABQ
        http://help.cleverfiles.com/usb-flash-drive-recovery/
        http://www.iskysoft.com/disk-recovery/usb-flash-drive-recovery-mac.html
        http://www.easeus.com/mac/mac-data-recovery-resource/recover-mac-usb-drive.htm
    Have you had any experience using any of them?  There are many more out there including ones that will 'scan' your flash drive ('free') and tell you what files it can recover, then you have to purchase the full program (~$99) to actually recover them.  Two of these programs are listed below:
        http://www.macintosh-data-recovery.com/?gclid=CPzujPKOn8ICFQNk7AodqFoAVw
        http://www3.softcity.com/mac-data-recovery/?tracking=SC_EN_PP_GO_SE_MDR&keyword= recover%20lost%20files%20on%20mac&gclid=CN7ArqaPn8ICFe_m7AodtFUAHg
    I had even converted 7 of the original '.pages' files to '.pdf' files to eMail some friends in the universal '.pdf' format on Nov. 28th.  The '.pdf' files were saved back to the original folder on the flash drive.  They, also, cannot be found anywhere!!?? 
    I can re-build the files (~150-200 photo pages from vacation trip back in May), but there were many comments and some special research (maps, etc.) I had included that I would probably not be able to duplicate exactly.  Luckily the '.jpg' photos from our trip are still present on the flash drive and also on the camera's memory stick - THANK GOODNESS!  However, now I am hoping that one of the recovery programs listed above might solve my problem.
    Again, thanks for your help, but I'm not THERE yet! 

  • Can't move large sized video files to flash drive without changing to mac extended

    I recently got  46 inch series 8000 smart tv. And today i bough a 16 gig hard drive so i could transfer my movie files to watch on the tv. Before tryin a large size movie i put a 756mb and it worked fine.. i then tried to put a 5 gig movie on the drive and i had an error that said it was to large for the volume. So i changed the ms-dos-(FAT) to the mac extended under disk utility. Now when i connect the flash drive to the tv it doesnt read it or pick it up.. Any help appreciated

    How is the flash drive formatted?  NTFS?  HFS?

  • Cannot drag Quicktime file to flash drive or burn to DVD. Help!

    I just finished a project in FCP. I exported it in QT format, and then created an iDVD project with it. Looks great. I've burend several DVD's, everything is fine. The movie file is 14.2 GB in size. Now, I need to drag the .mov file to a flash drive or SDHC card go I can give it to someone to play on their laptop. For some reason, I am getting a "File too large for volume's format" error no matter what I do. I have tried a 16GB USB flash drive, a 32GB SDHC card, and even a blank DVD. I ge the same error everytime. Is it a FAT32 limitation, or what am I missing here? How can I distribute this on flash media?
    Thanks for any help. 

    Nevermind, I'm an idiot. I just reformatted my SDHC card to exFAT and it transferred fine. Now as long as my friend's Windows 7 PC will read it, I'm fine! 

  • Problems copying files to Flash Drive

    I have been having problems copying files in the Finder to a flash drive when total storage exceeds 1gb or so. I recently obtained a 4gb flash drive and tried to copy about 1.5gb of files and the copy process just stops. I have had the same problem with an SD card in a card reader. If I put the SD card into a Sandisk mp3 player, which mounts as a drive, it will copy find. Also, if I take the card or flash drive to a PC, no problem.
    The same issue happens when I try to copy a lot of files from iTunes to a solid state drive. iTunes will go through a "calculation" process and simply not do the copy. It is not because of capacity. I can repeat the process to a folder on my hard drive and it works find. I then copy the folder to my mp3 player.
    I have been trying to do this for over a year now, hopeing that the next OS release would correct the problem, but it hasn't.
    Any ideas?

    In another thread, I found a suggestion to use Disk Utility to check and fix the thumb drive. I did this and there was a minor directory proablem withe the drive. Lo and behold, it now works!

  • How to sync files between flash drive .

    I have a 4 gig flash drive and create files at school and on my iMac. I start the year off will all of my classes having separate folders with additonal folders to orginize such as a project name or homework and copy that folder "school work" to my flash drive so i have the same thing. But as the year goes on and I have more homework it is confusing to know which device the file is on (computer or flash) I do not want to use drop box or google docs or any other online service. The school does not allow that and I don' want it. Just the flash drive. On the pc I coded in visuel basic (08) a program that on the desktop when clicked on when launched there was 2 buttons. Copy flash drive contents to computer ( folder school work) and it added new content ( merge) rather than replacing whole folder with the whole flash drive. And vice versa with computer to flash drive. It worked but not efficiently. I know the Mac can do better. Can someone please tell me what to do? I would like it when the flash drive. (NOT JUST ANY FLASHDRIVE BUT THAT FLASDRIVE) is plugged in to sync and merge the data so they are iddentical. Using Automator or AppleScript. Please help any advice would be very much appreciated. Also. I have Last years data for school and some other files on there and want to start it fresh with nothing on it so i can create the folder school work.should i just delete all the files manually ( I have no problem doing that) or use disk utility? What is the advantage of disk utility and will It harm the flash drive in any way ( such as making it Mac os extend instead of fat32? I need it fat 32 for all the PCs at school. Thank you in advance

    Here's a pretty thorough rundown on the options available: http://en.wikipedia.org/wiki/Revision_control
    A very simple solution is to get a Dropbox account. Then you can keep the file(s) in your dropbox and have them available in class or at home. Remember to make a backup on a regular basis.

  • Copying files to flash drive problem... really weird

    for some reason whenever i try to copy a folder that has a folder inside it to my flash drive or any flash drive, it says the folder already exists when infact it does not cause the drive was just formated many times.
    Ex. drag folder named (photoshop) with folder (projects) inside, and some mp3s, it tells me that folder projects is already there... and copys the mp3s fine..
    Whats causing this error ?

    mh434 wrote:
    I've looked at dozens of complaints about this, spanning several years, but I haven't found a solution.
    I have a complilation of songs on my PC (Win7 64) on iTunes (version 11.1.5.5).  I've been trying to find a way to copy my favorite playlist & contents to a memory card or flash drive. 
    Every piece of advice I've seen says to highlight, drag, and drop from iTunes into the other drive.  Of course, there ARE no external drives visible in iTunes.  It doesn't recognize any non-Apple devices or drives.  So, drag n' drop is impossible.
    So, I thought I'd try to do it outside of iTunes.  Nope - all of my music files on my PC are linked to iTunes...when I try to locate any of my music, iTunes automatically launches, and no other drives are accessible.
    So, I thought I'd try exporting my favorite playlist & contents.  However, nowhere can I find out if this will delete the playlist in iTunes at the same time (which, obviously, I don't want to do, as I'd lose the music on my iPad and iPhone at the next synch).
    Can anyone help with this?
    Thanks,
    Mike
    Mike,
    Arrange your screen so that iTunes is open in half the screen, and the folder representing the flash drive is open in the other half.
    Highlight the tracks you want in iTunes.  Drag them from there to the open folder.

  • Odd -- Can't Move Around Files on Flash Drive

    I've encountered a strange issue in the last couple days. I've searched the forum and couldn't find anything; pardon me if this has come up before.
    I keep lots of files on a 2GB Geek Squad USB drive and I use it all the time. Recently, I've sometimes been unable to move files around within the drive itself. If I try to drag a file to a new folder, for example, the pointer gets that white "do not enter" sign underneath it. This doesn't happen all the time -- I was just able to move a file into a new folder that earlier today I could not move.
    Even when this happens I can still seemingly copy files to and from the drive, just not move them around inside the drive itself.
    I have read and write permissions on this drive. When the problem occurs I check and I still have the permissions (that is, it doesn't mysteriously switch itself on and off). It's formatted FAT16.
    Can anyone take a guess as to why it lets me move files sometimes and other times it doesn't?
    Thanks!

    Well, FAT16 does work up to 2GB, so it might be fine.
    As to your question about the 256/512 entries, sorry, that's over my head!
    When you open the Flash Drive on the Mac, how many items, (files & folders), are there visible at the top level? Some FAT16 implementations have a limit of 256 entries at the top level, (folders can have more in them), other FAT16 implementations have a 512 item limit.
    I'd try Disk Utility on the Mac to Format/Erase one to FAT32 and see if that helps, or if it's not needed for use with PCs, Format it MacOS Extended.

  • IDisk for Windows on USB flash drive?

    Hello all. I am a physician/scientist in the not uncommon situation where the med school lab is mac-based but the hospitals are all-PC, with locked-down PC's on the wards. I have gotten around this to some degree by carrying around a little flash drive with "portable" versions of Firefox, Thunderbird, and OpenOffice. As I am going around the hospital seeing patients, I can go to any of the PCs, plug in the drive, and use my own software. I would like to be able to use iDisk this way, as an easy way to shuttle files around, but lacking administrator passwords, I cannot itstall it onto the flash drive. Can iDisk for windows be "portable-ized" to run this way?

    You don't need to use the iDisk utility in order to access your iDisk files from a Windows PC.
    http://docs.info.apple.com/article.html?artnum=52384
    However I suspect that the network may block the ports necessary for iDisk, but you could try.
    iFelix

  • Script for moving files and directory to archive

    Hi,
    I've search the web for good working script to archive my files and folder with no luck.
    do you have a script that move and preserve the structure of older files and folders that have not been accessed for X days?

    Hello, I found this quite quickly in the TechNet Gallery. It seems like it would do what you're looking to do.
    https://gallery.technet.microsoft.com/Archive-old-files-with-042f859a
    # Powershell script - move old files to an archive location.
    # Writes log files to $logpath
    # Ver 0.6
    $path = "C:\TEMP"
    $archpath = "D:\TEMP-ARCH"
    $days = "30"
    $logpath = "C:\Temp"
    $date = Get-Date -format yyyyMMddHHmm
    write-progress -activity "Archiving Data" -status "Progress:"
    If ( -not (Test-Path $archpath)) {ni $archpath -type directory}
    Get-Childitem -Path $path -recurse| Where-Object {$_.LastWriteTime -lt (get-date).AddDays(-$days)} |
    ForEach { $filename = $_.fullname
    try { Move-Item $_.FullName -destination $archpath -force -ErrorAction:SilentlyContinue
    "Successfully moved $filename to $archpath" | add-content $logpath\log-$date.txt }
    catch { "Error moving $filename: $_ " | add-content $logpath\log-$date.txt }

Maybe you are looking for

  • WLST and reading a property with a "." in the name...

    I am trying to share a properties file between two processes. The file has entries in it similar to the following: domain.name=myDomainName in my wlst script, when I try to read this property and assign its value to a variable in my script, it chokes

  • Does Airport Express support multiple ethernet connections via a switch?

    If I use the following configuration, with the Airport Express extending my network, will it handle multiple devices connected via a switch? Modem---Airport Extreme- - -802.11n- - -Airport Express---Switch---multiple devices (eg. network printer and

  • PO line item changes.

    Hi, How should I know for which line item has been changed/modified by whom. By using this CDHDR and CDPOS I did't find this.. please help me in getting 'Change order amount' this field I am able to see in EREV table but the problem is to know which

  • Do I need to format a SSD prior to installing it in my MacBook

    do I need to format a SSD prior to installing it in my MacBook

  • Toolbar button for a calculator?

    My client says that on her last computer, she had a button on the Acrobat toolbar that would open a calculator.  It may have been Acrobat X or Xi.  She is now using Xi, and I can't find an option for that.  Does anyone know how to make that happen?