OS Command to Move old files

Hi all
Do v have any OS level command which can move older files from one folder to other in
the sender file adapter?
Thanks and Regards
satish

I don't know how you are going to determine the old files.... but the move command is mv
mv $filename $trgdir
$filename - is a variable for the file to be moved..;
$trgdir is the target directory to be moved...
-SM

Similar Messages

  • Selectively move old files

    Hi
    I am planning  some data migration and need to move some old files to a different storage (USB or network share on a different server). So I am looking for the way to move files selectively (by the last time modified) to a different drive preserving data
    path. There can be old and new or newly modified files in the same folder/subfolders and I need to move only old files to a different drive keeping the same folder structure on a destination drive (so something like tiering in win 2012).
    All the data is on win 2008 and 2008 R2 servers.
    Has anybody done anything like this before? Any software that does that?
    Thanks

    Use RoboCopy with the MinAge parameter.
    http://ss64.com/nt/robocopy.html

  • Move old files powershell script

    I have a PS script that returns a list of files that have been modified more than seven days ago. If I add | Move-Item -Path "C:\Old" I end up with an error.
    Get-ChildItem –Path  “C:\New” –Recurse | Where-Object LastWriteTime –lt (Get-Date).AddDays(-7)
    What I am missing?
    Thanks

    needed to use -Destination instead of -Path

  • Terminal command to move multiple files containing certain text

    Hi all.
    Still new to mac so I'm hoping for a softly softly approach.
    I have over 300GB of SD versions of HD content just taking up space on my iTunes drive. Now, I realise backing up such a large amount of data is going to need yet another drive (or a huge amount of DVDs!), and at the moment isn't urgent but could be at this rate. I have been trying to use the cp comand to copy all files containing (HD) in the filename into a subfolder so I can easily separate then select the SD versions to backup/delete as needed. I would replace cp with mv once I got it working. However, since the terminal appears to work differently to Windows Command Prompt I've been having difficulty with the wildcards.
    How would I write the following:
    copy all m4v files in [this directory] that contain (HD) in the filename to [new directory]
    I tried
    cp *(HD).m4v
    cp * (HD).m4v
    cp *" (HD)".m4v
    and many other permutations but they all kept coming up with no such file or directory errors. Any help appreciated.
    edit: would there be a way of writing it as: copy all m4v files in [this directory] that do not contain (HD) in the filename to [new directory]
    Message was edited by: HappyTrucker

    I find this terminal stuff interesting but also annoying as a newbie trying to get his head around it.
    That's where making it a script simplifies it.
    Try:
    Open TextEdit (Applications->TextEdit) and then: Format->Make Plain Text
    Then copy the code below (edit to suit your needs) and paste in TextEdit and save as AnyNameYouWant.command on the Desktop (you can move it anywhere you want later)
    #!/bin/bash
    find /Volumes/Videos/TV\ Shows/The\ West\ Wing/ -not -name '*(HD).m4v' -exec mv {} /Volumes/Videos/TV\ Shows/The\ West\ Wing/sdversions/  \;
    Now, open Terminal (Applications->Utilities), and make AnyNameYouWant.command executable by entering:
    chmod u+x Desktop/AnyNameYouWant.command
    Now you can just "click" AnyNameYouWant.command on the Desktop to run.
    Tony

  • How System Command can replace a file in Application Server

    Hi Guys,
                  A new system Command is created. When that system command is executed, the client wants to take a file from one directory in application server and put that file into another directory on the application server itself. How this can be achieved?
                 What I know is we can create a function module and place that function module in the system command. But in that function module, I have to change the fielname and put that into another directory. I don't know how to do it.
    Note: I shouldn't read the data from the file using Open Dataset statements..
    Please let me the solution if any one has encountered such a scenario.
    Regards.
    Hari.

    I think you are mixing up things here.
    The program "sapiconv" is for converting files into different codepages, it´s not for copying/moving files to other directories.
    If you want to use the ZSAPICONV to you need to modify it, take out the "sapiconv" and put in the "mv" (move) command to move the file to the other directory.
    I suggest though creating a NEW command. e.g ZMV and give the appropriate parameters.
    Markus

  • Can't move music files to playlists or ipod...

    I've used iTunes for years, but for some reason, when I try to drag my music files to a playlist or to my iPod, the little green plus is not appearing and the playlist/iPod name does not highlight when I pass the cursor over it. I can't move any files anywhere! I can't move them from playlist to playlist or anything. I have "manually manage music" checked. I can't move old files or my new ones. It's not the iPod, because I can't move the files to playlists, either. I'm wondering if iTunes has a bug? I think I just updated it today.

    It doesn't sound like it's an issue with the files themselves, but rather with the trash.
    I haven't seen it, but I can see how that could occur. Each volume tends to have its own Trash folder. It's hidden, typically called .Trashes and at the root of the hard drive. I have had Trash-related issues outside of Aperture in the past (likely of my own doing). The issue with problems like these it it's nigh impossible to establish cause and effect… you could do something and not notice the problem for days or even weeks, in a completely un-related way.
    I doubt that "Repair Permissions" is responsible for the fix, unless the files were on your boot volume. RP has no effect outside of a boot volume.

  • HT1338 Purchased a used macbook pro with Mountain Lion. My old Mac runs Snow Leopard is backed up to Time machine. How do I register the operating system to me and how do I use Time Machine to move my files to the new used computer?

    Purchased a used macbook pro with Mountain Lion. My old Mac runs Snow Leopard is backed up to Time machine. How do I register the operating system to me and how do I use Time Machine to move my files to the new used computer?

    If you look at the User Tips tab, you will find a write up on just this subject:
    https://discussions.apple.com/docs/DOC-4053
    The subject of buying/selling a Mac is quite complicated.  Here is a guide to the steps involved. It is from the Seller's point of view, but easily read the other way too:
    SELLING A MAC A
    Internet Recovery, and Transferability of OS & iLife Apps
    Selling an Old Mac:
    • When selling an old Mac, the only OS that is legally transferable is the one that came preinstalled when the Mac was new. Selling a Mac with an upgraded OS isn't doing the new owner any favors. Attempting to do so will only result in headaches since the upgraded OS can't be registered by the new owner. If a clean install becomes necessary, they won't be able to do so and will be forced to install the original OS via Internet Recovery. Best to simply erase the drive and revert back to the original OS prior to selling any Mac.
    • Additionally, upgrading the OS on a Mac you intend to sell means that you are leaving personally identifiable information on the Mac since the only way to upgrade the OS involves using your own AppleID to download the upgrade from the App Store. So there will be traces of your info and user account left behind. Again, best to erase the drive and revert to the original OS via Internet Recovery.
    Internet Recovery:
    • In the event that the OS has been upgraded to a newer version (i.e. Lion to Mountain Lion), Internet Recovery will offer the version of the OS that originally came with the Mac. So while booting to the Recovery Disk will show Mountain Lion as available for reinstall since that is the current version running, Internet Recovery, on the other hand, will only show Lion available since that was the OS shipped with that particular Mac.
    • Though the Mac came with a particular version of Mac OS X, it appears that, when Internet Recovery is invoked, the most recent update of that version may be applied. (i.e. if the Mac originally came with 10.7.3, Internet Recovery may install a more recent update like 10.7.5)
    iLife Apps:
    • When the App Store is launched for the first time it will report that the iLife apps are available for the user to Accept under the Purchases section. The user will be required to enter their AppleID during the Acceptance process. From that point on the iLife apps will be tied to the AppleID used to Accept them. The user will be allowed to download the apps to other Macs they own if they wish using the same AppleID used to Accept them.
    • Once Accepted on the new Mac, the iLife apps can not be transferred to any future owner when the Mac is sold. Attempting to use an AppleID after the apps have already been accepted using a different AppleID will result in the App Store reporting "These apps were already assigned to another Apple ID".
    • It appears, however, that the iLife Apps do not automatically go to the first owner of the Mac. It's quite possible that the original owner, either by choice or neglect, never Accepted the iLife apps in the App Store. As a result, a future owner of the Mac may be able to successfully Accept the apps and retain them for themselves using their own AppleID. Bottom Line: Whoever Accepts the iLife apps first gets to keep them.
    SELLING A MAC B
    Follow these instructions step by step to prepare a Mac for sale:
    Step One - Back up your data:
    A. If you have any Virtual PCs shut them down. They cannot be in their "fast saved" state. They must be shut down from inside Windows.
    B. Clone to an external drive using using Carbon Copy Cloner.
    1. Open Carbon Copy Cloner.
    2. Select the Source volume from the Select a source drop down menu on the left side.
    3. Select the Destination volume from the Select a destination drop down menu on the right
    side.
    4. Click on the Clone button. If you are prompted about creating a clone of the Recovery HD be
    sure to opt for that.
    Destination means a freshly erased external backup drive. Source means the internal
    startup drive. 
    Step Two - Prepare the machine for the new buyer:
    1. De-authorize the computer in iTunes! De-authorize both iTunes and Audible accounts.
    2, Remove any Open Firmware passwords or Firmware passwords.
    3. Turn the brightness full up and volume nearly so.
    4. Turn off File Vault, if enabled.
    5. Disable iCloud, if enabled: See.What to do with iCloud before selling your computer
    Step Three - Install a fresh OS:
    A. Snow Leopard and earlier versions of OS X
    1. Insert the original OS X install CD/DVD that came with your computer.
    2. Restart the computer while holding down the C key to boot from the CD/DVD.
    3. Select Disk Utility from the Utilities menu; repartition and reformat the internal hard drive.
    Optionally, click on the Security button and set the Zero Data option to one-pass.
    4. Install OS X.
    5. Upon completion DO NOT restart the computer.
    6. Shutdown the computer.
    B. Lion and Mountain Lion (if pre-installed on the computer at purchase*)
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because
    it is three times faster than wireless.
    1. Restart the computer while holding down the COMMAND and R keys until the Mac OS X
    Utilities window appears.
    2. Select Disk Utility from the Mac OS X Utilities window and click on the Continue button. 
    3. After DU loads select your startup volume (usually Macintosh HD) from the left side list. Click
    on the Erase tab in the DU main window.
    4. Set the format type to Mac OS Extended (Journaled.) Optionally, click on the Security button
    and set the Zero Data option to one-pass.
    5. Click on the Erase button and wait until the process has completed.
    6. Quit DU and return to the Mac OS X Utilities window.
    7. Select Reinstall Lion/Mountain Lion and click on the Install button.
    8. Upon completion shutdown the computer.
    *If your computer came with Lion or Mountain Lion pre-installed then you are entitled to transfer your license once. If you purchased Lion or Mountain Lion from the App Store then you cannot transfer your license to another party. In the case of the latter you should install the original version of OS X that came with your computer. You need to repartition the hard drive as well as reformat it; this will assure that the Recovery HD partition is removed. See Step Three above. You may verify these requirements by reviewing your OS X Software License.

  • How do I create a new user, move my old files etc over, and delete old user

    This is why I think I need to.
    My computer got hit by lightening, and I may have created a new user account through netinfo rather than system preferences /accounts/+user. Mail used to open twice, but no longer. Now, Safari askes me for my keychain password twice, Spotlight can't find a folder on the computer when the search is restricted to folder and computer, though the folder is there and easyfind finds it, and when System Preferences/Spotlight/Privacy has the hard drive icon added, then deleted, Spotlight still does not find anything. (Yes, everything is backed up, on CD, DVD, and online.) Microsoft Tec Support says
    "Here is a summary of the key points of the case for your records.
    When you contacted us on August 8, you had requested assistance with Microsoft Office 2004, as your installation of the updates was unable to find the correct version of the software to update. After creating a New MAC User, we identified the issue to be with a corrupt MAC User account, and not a Microsoft issue. "
    I believe Microsoft. So, creating a new user was easy.
    But copying files uses up too much hard drive (movies, music), and may miss keychains, preferences, mail, address book, and documents. Since Spotlight no longer works, who knows what is happening. (Yes, I've repaired persmissions, and disk repair. No change). I'm using up my hard drive trying to move files to the new user. If I share files, or put them into a public folder, then delete the old user, will I still have the old user's files in the new user's account? It is not clear to me what I should be trying to do in order to create a new user, move my old files etc over, and delete old user. Thanks.
    My responses will be slow, because I have to drive to town to use the internet. I've ordered a new airport which may take care of that problem. SO be patient.

    Hey -
    I need to do the EXACT same thing, but have no idea how. Has anyone out there done this?
    My situation is a tad different..this is a new Mac (and I'm a brand new Mac user). Tons of querks occur under my original account (videos won't run, Safari won't support certain plug-ins). I spent 6 hours on the phone w/ 4 different Apple Reps and nobody could fix it. A rep finally looked at my MacBook Pro in person today. He created a new account just to see if that would work and under that new account, everything works perfectly fine (no querks, can view video). He tried switching a million settings in my original account to no avail.
    He said to create a new account (as he did) and move my files over to the new account and then go back to the original and delete it. How do you do this?! I can't figure it out! I've got a new account created, but of course it just has the default folders in it w/ the little red icons next to them! Thanks in advance!

  • How do I move data files from old iPhone? Specifically, the password files for the App mSecure from my old iPhone 3Gs to iPhone 4S?

    How do I move data files for mSecure (a password saver app) from old iPhone 3GS to new iPhone 4S?

    That article is about using your iPod as an external hard drive, to move files from one computer to another computer.  It is not related to your question.
    You can't use iTunes to move song files from iPod to computer, except for songs you purchased from the iTunes Store (and you can also re-download purchases).  However, there are third-party methods and utilities that can move song files from iPod to computer.  If you do a Google search on something like "ipod transfer," you should get some links.
    Once the song files are on your current computer, add them to that computer's iTunes library by dragging the files (or folder containing the files) to the iTunes window.  After confirming everything is there (and fixing the data issue you mentioned) you can sync the iPod.  You may want to do a Restore on the iPod, if it might have a data corruption issue, which will erase the iPod's hard drive, re-install the latest software, and set it to defautl settings.

  • How do I move all files from an old PPC to a new Mac Mini?

    How do I move all files from an old PPC to a new Mac Mini?

    The new mini has a Firewire 800 port. Likely the PPC version only has Firewire 400.  The OP will need a converter cable which is why I was asking first about what hardware is available and how much is being copied.
    Probably go with using the external hard drive if you decide all you want are data files.
    If you want to migrate:
    Kappy: A Basic Guide for Migrating to Intel-Macs - http://discussions.apple.com/message/10257343
    Mac OS X 10.3, 10.4: Transferring data with Setup Assistant / Migration Assistant FAQ - http://support.apple.com/kb/HT1554
    Setting-up a new Mac from an old one or its Backups - http://web.me.com/pondini/AppleTips/Setup.html

  • I created a new home folder on an external but didn't move my old files over. Now I can't see the old hard drive in my mac mini. How can I locate that drive?

    I wanted to move my home folder to an external drive. I created a new home folder and in advanced options I moved it over. I didn't however move my files over first, my bad. Now I can't see the hard drive on my mac mini. Is it possible to reverse it or get access to the old home folder and is it possible to still use the mac mini's internal hard drive for storage? How do I find my shared folder, it was on the internal drive. I'm new to macs as you might have guessed at this debockle. Can anyone help?

    I'm using Mavricks. I wanted to move my home directory to an external and went into sys prop/users/advanced options and moved the folder ok. Being a noobie on Macs I didn't copy my data and such. So my settings were all new. Basicly now I don't see the internal drive on my mini. There is a lot of strage I'm not able to access. The internal drive doesn't show up. How can I put a folder back onto it so it shows up?

  • I want to start a new movie but iMovie is hung looking for an old file and says:"Without this file, the movie cannot play properly."

    Hello!
    I recently upgraded to Lion. Every time I start up iMovie, it asks if I want to go ahead and generate thumbnails. I say OK, then it alerts me that it cannot file the file IMG_0073.MOV. Then it says "Without this file, the movie cannot play properly." It gives me the option to either cancel or search for the movie.
    I don't have the old file it's looking for. I simply want to start a fresh movie with new material but cannot get past this hump. Based on the little research I have done, some people experienced this problem because the files were in aperture at some point, which was the case for me before when I used iMovie. I have since moved forward only with iPhoto but perhaps it's hung on an old file format?
    I tried taking another old movie and renamed it IMG_0073.mov to see if I could simply select it, give it what it wants and move on but it won't let me select the file for some reason. I also tried removing iMovie and downloading a fresh version but that didn't work either. My BF tried removing pfiles (I think that's what it's called? but again no luck)
    Please help! I must get this assignment done for a class!

    Hello!
    I recently upgraded to Lion. Every time I start up iMovie, it asks if I want to go ahead and generate thumbnails. I say OK, then it alerts me that it cannot file the file IMG_0073.MOV. Then it says "Without this file, the movie cannot play properly." It gives me the option to either cancel or search for the movie.
    I don't have the old file it's looking for. I simply want to start a fresh movie with new material but cannot get past this hump. Based on the little research I have done, some people experienced this problem because the files were in aperture at some point, which was the case for me before when I used iMovie. I have since moved forward only with iPhoto but perhaps it's hung on an old file format?
    I tried taking another old movie and renamed it IMG_0073.mov to see if I could simply select it, give it what it wants and move on but it won't let me select the file for some reason. I also tried removing iMovie and downloading a fresh version but that didn't work either. My BF tried removing pfiles (I think that's what it's called? but again no luck)
    Please help! I must get this assignment done for a class!

  • I have moved old Back Up files from my external hard drive to the trash and as the Trash previews the files, i.e. counts them (over 850,000 files) it then begins to delete but then stops. Is it possible to move the files out of the Trash file and then onl

    I have moved old Back Up files from my external hard drive to the trash and as the Trash previews the files, i.e. counts them (over 850,000 files) it then begins to delete but then stops. Is it possible to move the files out of the Trash file and then only delete a small amount at one time?

    See
    Deleting backups via the Finder on Lion 10.7.x or later:
    http://pondini.org/TM/12.html
    Hold option (alt) while emptying the Trash.
    See also
    http://pondini.org/TM/E6.html
    Message was edited by: WZZZ

  • Old mac wont boot xcpt via firewire, want to move iphoto files from old to new, where are the pics stored?

    old mac wont boot xcpt via firewire, want to move iphoto files from old to new, where are the pics stored?

    Photos are stored in your home folder (~pictures).
    Barry

  • I have a new computer and I want to install Itunes and move my files from my old computer to my new one. How do I do that?

    I want to install ITunes on my new computer and move my files from my old computer to my new one. How do I do that?

    See this migrate iTunes library post for background on moving your library across properly.
    tt2

Maybe you are looking for

  • Boot Camp Assistanse 5.0.2

    I have a legal Windows 8 64 bit DVD and Boot Camp Assistant 5.0.2 my OSX is 10.8.3 and when bootcamp tries partitioning disk it doesn't work i keep if i have any thunderbolt plugged but i didn't. I've been trying to make this work for atleast a year

  • TS3212 I've turned off pop up blocker and sercurity suite, still installer is interupped won't install help!!

    I've turned off pop up blocker and my sercuity and firewall, still can't get I tunes to install any ideas

  • Travel Commitment

    Hi! All, After saving a Purchase Order with Account Assignment to an Internal Order, commitment will update the COOI table. However, for a Travel Request with Account Assignment to an Internal Order(after approval of the request, before Transferred t

  • Mixing graph types

    Hi Experts,     I have a requirement to show two graph types. One as background another for representing data in foreground.         For the graph to show background; the color bounds must be shown vertically and for that i am using Chart Type Stacke

  • DualCoreCenter Fails to work

    Sorry for such a Noob question but When I click the DualCoreCenter icon I get a brief hourglass mouse cursor then nothing...it seems to not execute.  I have the Dot Net framework installed..... Any ideas? Thanks