Windows 10: recursively search C: for specific file-type type then copy w/Path

Discus and support recursively search C: for specific file-type type then copy w/Path in Windows 10 Support to solve the problem; Pretty much what it says in the Header. I am sure this can be done using the correct switched in several tools like robocopy or even X-Copy but so far... Discussion in 'Windows 10 Support' started by questorfla, May 11, 2019.

  1. recursively search C: for specific file-type type then copy w/Path


    Pretty much what it says in the Header. I am sure this can be done using the correct switched in several tools like robocopy or even X-Copy but so far copying the file including its full path to another location is not working properly for me.
    I think i have the recursive part working but the files i am looking for are all in hidden or system folders. To be specific, all the *.ACL files. I would like to have a copy of each located in its current full path in another folder for a project I am working on. I have a number of tools that can easily find them all. Ultrasearch is great for that. But nothing allows me to copy all 30 of them with their full paths to another folder.

    :)
     
    questorfla, May 11, 2019
    #1

  2. [Solved] PowerShell search string and copy file

    Hi all,

    I'm preparing a script to find some text inside the files ('test' and 'test1' are the keywords in this scenario) and once all the files have been found, they should be copied to a different location while maintaining the folder structure.

    For example: The path c: \src\ contains 10 files, 3 include the search words. These 3 files should be copied to c:\dst\

    Everything should be recursive for all subdirectories of c:\src\.

    So if in the path c:\src\somefolder

    \ there were other files with the same search words, they should be copied to c:\dst\somefolder \

    Here my code:

    ### Code ###

    Write-Host ""

    Write-Host "Note: Path must end with '\'"

    Write-Host ""

    # Var.

    $sourceDir = Read-Host 'Source path'

    $targetDir = Read-Host 'Destination path'

    # Decl.

    $tree = gci -Directory -Name -Recurse $sourceDir

    # Check if $sourceDir exist

    if(!(Test-Path -Path $sourceDir )){

    "Source is not a valid path!" ; pause

    exit 1

    }

    # Check (and create) $targetDir

    if(!(Test-Path -Path $targetDir )){

    mkdir $targetDir -Force

    }

    # Rebuild Tree

    foreach ( $folders in $tree ) { mkdir $targetDir\$folders -Force }

    # Copy Founded Files

    $ftc = Get-ChildItem $sourceDir -Recurse | Select-String "test","test2" | Select Path |

    foreach{

    $targetFile = $targetDir + $_.FullName.SubString($sourceDir.Length);

    Copy-Item $_ -destination $targetFile

    }

    ### EOF ###

    I can not figure out where the error is. Does anyone know how I can solve it ?

    The proposed error is: Copy-Item: Unable to find the unit. A unit named '@ {Path = C' does not exist.
     
    DennisAnfossi, May 11, 2019
    #2
  3. JSamuel3 Win User
    How To Type a File Path Without Username

    I'm trying to type a file path to the documents folder that can be used on any PC.

    However, when I use C:\Users\username\Documents it only works on my PC, because it's specific to my username.

    Is there a way to type a file path to the documents folder that will work on any PC?
     
    JSamuel3, May 11, 2019
    #3
  4. sfcsfcsfc Win User

    recursively search C: for specific file-type type then copy w/Path

    File search types in the Windows 10 file explorer search (using words)

    Hi

    I am trying to find out how I can search for specific files from the File Explorer.

    So far, I have found out that you can search for files with specific names if you type "name:<name>" into the search input field.

    Were can I find a list of the verbose search commands i.e. a list of the words+column character I should use to search files by other properties than their name?

    For example, what should I type if I am trying to list files by file type:

    filetype:<whatever>

    or

    type:<whatever>

    or what?

    I know that there is a Search toolbar, but I would like to just type the search into the search field to speed up the process. Also, I do not wish to use Cortana et al. I'd just like to use plain simple verbose search....

    Thanks
     
    sfcsfcsfc, May 11, 2019
    #4
Thema:

recursively search C: for specific file-type type then copy w/Path

Loading...
  1. recursively search C: for specific file-type type then copy w/Path - Similar Threads - recursively search specific

  2. "Type here to search"

    in Cortana
    "Type here to search": I cannot access this tab. It isn't working. What do I do? https://answers.microsoft.com/en-us/windows/forum/all/type-here-to-search/19a9d6fe-7e9b-4e45-a87b-b5b6934d11b9"
  3. Searching for file types in WIN 10

    in Cortana
    Searching for file types in WIN 10: Win XP had 'search for photos, images' or 'search documents' options in search dialogue. No such options in Win 10? how to search for a type of files in Win 10?...
  4. Copy/Paste Clipboard file types.

    in Windows 10 Customization
    Copy/Paste Clipboard file types.: I lose transparency when copying and pasting from Photoshop to Illustrator. I believe this is because when switching applications, Photoshop exports the clipboard data to the OS clipboard, and Windows clipboard(as I understand it) only takes image data as BMP which doesn't...
  5. Type-C Hub not working

    in Windows 10 Drivers and Hardware
    Type-C Hub not working: I have a Type-C USB hub that works properly on my desktop computer; however, when connected to my laptop, it does not show up at all. There is not an error notification or anything....
  6. setting default icon to display for specific file types with registry

    in Windows 10 Support
    setting default icon to display for specific file types with registry: Something in Windows 10 or another program has created an issue that I cannot find any way to fix. I tried the normal things for setting the default program. Both by using properties on the files as well as using the Windows Default App settings in every combination i can...
  7. USB C-TYPE adapter

    in Windows 10 Drivers and Hardware
    USB C-TYPE adapter: HI! I have my laptop Dell XPS 13 9350 and I use to connect to a external monitor with a adapter USB C-TYPE to VGA and use to work with no problems. And since I reboot to factory reset now my adapter USB C-TYPE to VGA can't even detect at all... I been trying to find answers...
  8. Exclude "file type" from search

    in Windows 10 Support
    Exclude "file type" from search: I need to find all the files that contain the word "word" in them. When I try to search in File Explorer, I get all the files that are Microsoft Word files. How do I search for matches on only content within the file? I need to find all the files that contain the word...
  9. copied file has no file type

    in Windows 10 Support
    copied file has no file type: Hello can someone tell me how to add the file type to a file? I copied 2 video files from my samsung galaxy onto my dell PC but when I open properties beside file type it just says file instead of mp4 which I know they are because I made the videos. Im assuming the solution...
  10. File type search?

    in Windows 10 Support
    File type search?: Does anyone know of a way to search an entire computer for instances of a specific type of file? For example, Microsoft Word Document (.doc). I may know that I created a Word doc about something a long while ago e.g. a year, but I don’t remember the name of it, and where I...