How to pull files or folders

Hey all so I need to get some SCCM log files from a few hundred machines in a few labs. I really have no idea how to get a file and how to store it on my computer.
Get-ChildItem \\ceit2321104x*\c$\Windows\Temp\SCCM_Logs | Sort-Object length -descending
$outputfile = $env:USERPROFILE + "\desktop\test.txt"
Function Get-Autocad {
PROCESS {
Get-ChildItem "\\ceit2321104x016\c$\Windows\Temp\SCCM_Logs" | where {$_.Attributes -eq 'Directory'}
Get-ADComputer -SearchBase 'OU=CEIT,OU=TSVC,OU=LABS,OU=Devices,DC=ad,DC=test,DC=edu' -Filter {Name -like 'CEIT2322102' } | Select-Object -ExpandProperty Name | Get-Autocad | Out-File $outputfile
#-and Name -like 'CEIT2322103' -and Name -like 'CEIT2322120' -and Name -like 'CEIT2551202' and -like 'CEIT2551204'
I've been messing around with these and have had no luck so far. I pretty sure I need to use the get-childitem and then output that somehow or set that equal to something. Thanks I have little knowledge of powershell and any help is appreciated.

Alright awesome could I somehow use AD to get the names?
Something like this:
$Comps = Get-ADComputer -SearchBase 'OU=CEIT,OU=TSVC,OU=Labs,OU=Devices,DC=ad,DC=SCHOOLNAME,DC=edu' -Filter { Name -like '*ceit2551202*'}
foreach ($c in $Comps)
Get-ChildItem \\$c\C$\Windows\Temp\SCCM_Logs\AutoCAD* -Recurse | copy -Destination C:\Users\cody-horton\Desktop\2103 }
Otherwise it seems like I would have to type ever computer name in that listofnames.txt files. I have about 200 machines I need to check so anyway I could automate it will help.
Thanks for all the answers so far.
Also a side question why would this nested loop not work after computer 08 it errors out and says container cannot be copied onto existing leaf item.
$i = 0
$j = 0
while($i -le 4){
while($j -le 9){
Copy-item \\ceit2551202x0$i$j\C$\Windows\Temp\SCCM_Logs\AutoCAD* -Destination C:\Users\cody-horton\Desktop\2103\$i$j -Recurse -Force
$j++
$i++

Similar Messages

  • How to move files between folders within Lightroom 3?

    I would like to move a file from one folder to another within Lightroom 3 (let's not discuss why). I searched the threads but couldn't find the answer (maybe I missed it). When I click on a photo within grid view then drag and drop that file onto a different folder in the folder panel (to do the move), a little plus sign (copy) appears and a copy of the file is placed in the second folder. If I try to delete the photo from the original folder (to get the move), both copies of the file are removed. I've tried holding down all sorts of keys on the imac but cannot get the move to work. Ideally, I'd like to move a group of photos but cannot even move one. Does anyone know how to move files between folders in Lightroom 3?

    Your suggestion works. Thank you for posting it.
        Ron
    2010/10/28 Dorin Nicolaescu-Musteață <[email protected]>
    Try selecting the photos, right-clicking the target folder and choosing
    "Move Selected Photos to This Folder".
    >

  • How to sort files and folders like Windows

    I don't know if this is specific to Arch or every other Linux distro but one thing that really bugs me in Arch is how files and folders are sorted. I use Windows as my main OS (don't start on that please) and I have one folder properly organized exactly as I want it and I like it how Windows sorts this. I access that same folder from my Arch installation, the problem is that the sorting is different and it gets on my nerves lol...
    This is how Windows sorts that specific folder:
    C:\Users\Nazgulled\Documents\University>dir /O
    Volume in drive C is Vista
    Volume Serial Number is F84E-02BE
    Directory of C:\Users\Nazgulled\Documents\University
    05-08-2009 15:34 <DIR> .
    05-08-2009 15:34 <DIR> ..
    05-08-2009 11:10 <DIR> [Archives]
    05-08-2009 14:38 <DIR> [Developers]
    05-08-2009 11:17 <DIR> [X] 1) Cálculo II
    05-08-2009 11:18 <DIR> [X] 2) Análise de Custos
    05-08-2009 11:18 <DIR> [X] 2) Cálculo de Programas
    05-08-2009 11:18 <DIR> [X] 2) Laboratórios de Informática III
    05-08-2009 11:18 <DIR> 2) Algoritmos e Complexidade
    05-08-2009 11:18 <DIR> 2) Arquitectura de Computadores
    05-08-2009 11:18 <DIR> 2) Comunicaçao de Dados
    05-08-2009 11:18 <DIR> 2) Engenharia Económica
    05-08-2009 11:18 <DIR> 2) Estatística Aplicada
    0 File(s) 0 bytes
    13 Dir(s) 24.700.485.632 bytes free
    And this is how Arch does it:
    nazgulled ~/University $ ls -l
    total 7
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 2) Algoritmos e Complexidade
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 2) Arquitectura de Computadores
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 2) Comunicação de Dados
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 2) Engenharia Económica
    drwxr-xr-x 1 nazgulled nazgulled 8192 2009-08-05 11:18 2) Estatística Aplicada
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:10 [Archives]
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 14:38 [Developers]
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:17 [X] 1) Cálculo II
    drwxr-xr-x 1 nazgulled nazgulled 12288 2009-08-05 11:18 [X] 2) Análise de Custos
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 [X] 2) Cálculo de Programas
    drwxr-xr-x 1 nazgulled nazgulled 4096 2009-08-05 11:18 [X] 2) Laboratórios de Informática III
    How can I get Arch/Linux to sort exactly the same as Windows?
    Last edited by Nazgulled (2009-08-05 14:41:47)

    toad wrote:
    Nazgulled wrote:Surely there must be a way to have the same sorting collation in Linux like in Windows
    Ah, no. The way they are doing it is nonsensical and not good practice for a unix style system. Having said that, some solutions have already been offered in this thread.
    While you are free to continue to ask others to help you achieve your aims, it may be more convenient for you to adapt to a structure that is displayed the same way under all systems (just to avoid frustration - not saying you _should_ do it ).
    I really don't care if it's nonsensical, I use Windows 95% of the time or more, it's my main OS, I'm used to it and I like it. Why should I care if it's not a good practice for a unix style system? I just want things to behave the way I like and for a free system like Linux where it doesn't even compare to Windows in terms of freedom in what I can do with it and configure the way I like, it sure is hard to change the way folders/files are sorted...
    It sucks that there isn't a proper solution but I'm not going to adapt anything, that would be nonsensical... But if I have to, I can live with the fact that there isn't a good solution and leave it as it is
    Thanks everyone for their input, "topic closed".

  • HOW TO MOVE FILES BETWEEN FOLDERS ON APPLICATION SERVER

    Hi ,
    I want to move files between folders on application servers and also on presentation server.
    Is any ABAP code available for it.
    Can anybody help me out in this.
    Waiting for reply.
    Thanks & regards,
    Nitin

    I am also interested in this post. The FB  ARCHIVFILE_SERVER_TO_SERVER workes fine for copying the file, however I also need to remove the file from its original location.
    Does anybody have a sugestion on how I can do that (in coding).
    Regards,
    Minim

  • Canvio DTD21B - how to restore FIles and Folders on a different system

    Hi I'm helping my friend.  We backed up her old laptop's hard drive  to a new Canvio 1Texternal hard drive, but backed up the whole system.  The system is now defunct.  It ran Win 7. This is three weeks later and we have a new 17" Toshiba laptop running WIN 8.1. I can't seem to find a way to restore just her FIles and Folders to the new system.  I do not want to overwrite the Win 8.1 operating system so do not want to do a full restore. Her Files and FOlders are important to her so I would appreciate your adice as to how to restore just that data. I can't find anything in HELP or on this forum that addresses this issue.
    THank you.

    I am really surprised that no one has the answer to this question. But, thanks to the 170 of you who read my plea for direciton

  • How to share files and folders between users of a same mac

    Hello,
    I would like to share a folder among users of the same Mac. I have a folder called toto, containing files and folders and i would like to share toto with other users of my mac. I would like the other users to be able to read and write every file contained in the shared folder toto.
    Is it possible ?
    Thanks a lot,
    Franck

    Yes, that works for items that are already there, but would have to keep being repeated for newly-created items.
    Actually, using chmod -R 777 <folder> raises a Unix question for me that perhaps a more knowledgeable person here can answer for both of us.
    Setting the  "x" bit on an enclosed folder would make it "searchable", which is what you want here, while setting the "x" bit on an enclosed file would make it "executable", which would not be intended.   It's  my understanding that if you use chmod -R 777 you will set the "x" bit on all enclosed items, including the files, while using, say, chmod -R a+rwX would only set the x bit on enclosed folders, not the enclosed files. My question for someone here is, should you therefore never use chmod -R 777 on an enclosing folder and instead always  use something like chmod -R a+rwX?  Does it make any difference in practice whether or not your datafiles are inadvertently made "executable?"

  • How to delete files, leave folders?

    I have a folder in my documents folder that I would like to clean up. It contains many folders and sub-folders (directories and sub-directories) in a many layers deep arrangement. I would like to delete only the files while preserving the folders and sub-folders (makes backing up and synchronising a LOT easier).
    I am not using Time machine.
    Help appreciated.
    (If it is easier to just delete the main folder and then copy back just the folders from the back-up drive, please help me figure out how.)

    Terminal session
    find /path/to/starting/directory ! -type d -exec rm -f {} \;
    As has been mentioned before, this is a dangerous operation, so MAKE SURE you have the starting directory correct.
    Best to test first using
    find /path/to/starting/directory ! -type d -ls
    Then use the remove file version.

  • HT203052 How to arrange files in folders

    I prefer working with lists by name or kind.  How can I format my icloud to do so?

    Ah, good info. Yes, the iCloud interface is very bare bones, and it displays as icons and sorts alphabetically for me. There's no way to change it that I know of, and I checked.
    It would be nice if there were more options on the web, but I sorta think that Apple is figuring that people will use their Macs or their iOS devices as the primary interface to iCloud drive, and the web is just there in case you really need to access a document that's up there when you're away from your devices, and it's not intended to be a full-featured management interface.

  • Hide files n folders

    Plz help me by telling how to hide files n folders n how to view hidden ones.

    To show hidden files and folder, open a terminal and type:
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder
    This will kill your Finder and reopen it (restart Finder) and now you will be able to see all hidden files and folder.
    To hide (hidden folders and files), type the following in the terminal:
    defaults write com.apple.finder AppleShowAllFiles FALSE
    killall Finder
    If you want to create a hidden file or folder since Mac OSX is a unix based OS, then just open a terminal and create a file/folder that has '.' at the beginning of its name. For example to create a hidden Secret folder in your Desktop, do the following:
    Open Terminal
    cd Desktop
    mkdir .Secret

  • My webhost had me delete my TBird account, and create a new account. How do I get my folders & files from my Hardrive back to TB? THANKS!

    My webhost had me delete my ThunderBird POP3 account, and create a new ThunderBird IMAP account.
    This took all my folders and files out of Thunderbird!!!
    I know where all my folders and files are located on my hard drive.
    How do I get my folders & files from my hard drive back to TB?
    Any help will be much appreciated.
    THANKS IN ADVANCE!
    Jeff

    When you delete a Pop mail account, it disappears from the Account Settings and Folder Pane, but fortunately it still exists in the Profile folder unless you had removed it.
    Ideally, you should have moved all the emails into 'Local Folders' before removing the account.
    You could use this addon tool to import messages into 'Local Folders' account.
    '''ImportExportTools: '''
    * https://addons.mozilla.org/en-US/thunderbird/addon/importexporttools/
    Download the .xpi file and save to desktop or Downloads folder.
    '''To install addon:'''
    In Thunderbird
    'Tools' > 'Addons' OR 'Menu icon' > 'Addons'
    * click on the gear wheel icon and select 'Install addon from file'
    * Locate and select the .xpi file you downloaded and click on 'Open'.
    * After installing you will need to restart Thunderbird to activate.
    In 'Local Folders' create some folders with suitable names.
    Right click on folder > ImportExportTools
    There are a couple of Options on importing
    See image below as example aid.

  • How Do I Copy File Names & Folders From A Hard Drive To A Word Document?

    Hi Gang:
    This may sound silly but I am having a herd time with the following - seemingly simple task.
    I have data DVD-Rs with audio files organized into folders. Each folder contains audio files related to the folder name.
    I would like to copy the file names and folders from a DVD-R and paste them into a MS Word file. I am just looking to get a listing of files as they appear on the DVD-Rs in their folders.
    The problem is that when I copy and paste, the order changes (seemingly randomly) and the file names are no longer under the folder names. In fact, the whole thing looks to be really random.
    Anybody know how to copy file/folder names from a hard drive or DVD-R to a word document and retain the file/folder structure?
    Thanks!
    LAHD

    There is an even easier method with no Terminal magic required. In the Finder, select all the files you want the names of, press Command-C, switch to Word and press Command-V. Poof, your done.
    If you view the DVD in List VIew, you can expand the folders you want the files for, then select all the files (and their folders if you want them too) and then do the Copy/Paste thing.
    Message was edited by: petrock

  • How do I move music folders with individual music files from windows 7 to itunes folder so that they are recognizable and playble?

    How do I move music folders with individual music files from windows 7 to the itunes library so the files are usable in itunes?

    All of the following programs should work with Vista.
    Yamipod. This is a free program that transfers music from iPod back to the computer. However, it does not transfer playcounts/ratings etc.
    Another free program is Pod Player.
    SharePod is also freeware.

  • How to compress my files and folders, How to compress my files and folders

    Good morning,
    My name is Jai Bhandari and I am from London, UK.
    I am sending this out to everyone that can help me to compress my files and folders, as I believe my macbook pro is starting to freeze and caused by having a slow machine, is there anyone that can suggest to me how and what do I use to compress these files into one folder.
    Thank you for reading this and hope to hear from you soon.
    Many regards
    Jai

    You can 'compress' files and folders from the Finder by selecting the items and choosing File>Compress "selected file or folder". This will create a zip archive and will save you some space. (I just tried it on a 16GB folder and it compressed it to an 11GB zip file). After you zip the file/folder the original can be deleted )until you need to access it again, then you can just double-click the zip file).
    If you're trying to free up disk space on your hard drive, this is not the best method... but you didn't ask about that...
    Clinton

  • How can I EXCLUDE particular folders/files from being included in the Lightroom 5 catalog?

    How can I EXCLUDE particular folders/files from being included in the Lightroom 5 catalog?
    I want to be able to specify paths and/or filename patterns that should NEVER be indexed in the catalog: not that they don't show up under certain circumstances, just that they are NOT THERE (in the catalog) to begin with!!
    I also do NOT want to have to respecify these criteria when "synching" the catalog; criteria should be PERMANENT (or at least 'til they're changed in LR preferences).
    I cannot be the only person in the world with this problem--but it sure seems like it, because I've spent an inordinate amount of time doing online searches & I can't find anything that addresses this issue.
    Can anyone PLEASE HELP me?
    BTW, Adobe employees (if there are any of you out there), I'm simply trying out LR now.  If I can't get this (seemingly fundamental) thing worked out (with relatively little effort), Adobe is going to LOSE A SALE of LR, because it's useless to me without this feature.
    Thanks,
    -t

    Thanks for the info... but how to you TELL LR to EXCLUDE images in a particular directory/directory structure?  The intuitive place to indicate this would be a right-click on the folder itself (or particular images), but no such option exists..  "???"  Thanks again, -pt
    The same way that you avoid buying things in your local convenience store. You don't stick a lot of labels on certain shelves, slap a credit card down on the counter each week, and announce you are buying everything that doesn't have a label on its shelf. You just choose the things you want to buy.
    Your mention of "synching the catalog" suggests that you are expecting the LR library, to mirror the total images in the computer by default. This is not IMO a useful way to think about it. LR contains no images at all, by default: the Catalog starts out empty.
    Then you Add just those selected images that you want to import, among those already in the computer. That's a one-off process which is IMO best achieved controllably in batches - which you can keyword and otherwise organise in LR terms as you go. For new incoming images, ongoing, it is a question of Copying, Moving or Adding these in defined batches as they occur - from the relevant location only - there is no need to re-consider the import of a wider body of images. And one would not want to repeat that whole task anyway: one's prior investment in achieving the right selectivity, has a positive value.
    RP

  • My macbook pro (using lion os) can't search files and folders on external hard drive! How can i solve it?

    When i used Snow leopard, i can search every files and folders on my external hard drive (NTFS). But when i upgraded to lion OS, sportlight didn't index files on exteranal hard drive and i can't search everything on external hard drive whatever i type in the search box! I also check the Finder preference and select when performing a search to "Search the current folder" ! How can i solve this problem! Please help me if you know!

    iTunes>Preferences (Cmd+,)>Advanced
    Choose the Ext HD (and the appropriate folder) as the location for your library.

Maybe you are looking for

  • How Do I Make a Boot/Startup on CD not Floppy?

     I have a Lenovo Thinkpad R61li 15.4" screen laptop.  It's important that I keep this computer in service with the Win XP Pro Sp 3 because I have two vital programs which will not install on Win 8. This computer has never had a "A: Floppy dirve" and

  • How to install OS X .dist packages?

    I've downloaded a number of recent OSX updates that include .dist files. How can I use ARD to distribute these updates to the Macs on our network? Thanks

  • Best approach for using Faces with growing children?

    Hi all, I'm I recent Aperture user with young kids (four-year old twins), and I'm wondering how best to use Faces to identify the kids' faces.  I started working with about 6 months worth of recent photos in Aperture (3.2.3) before importing my full

  • Library naming and sorting strategy

    Hi all I am new to Aperture and before I start importing all my pics I am trying to determine my filing strategy. Basically my pictures consists of Holiday Snaps and hobby Portfolio type pics. I am thinking of creating two libraries. One Snaps and On

  • Opening a file from Oracle Forms

    How do I open a file directly, that's located on my desktop or the server from Oracle 10g Forms 9i ?