Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

wasimxe

Solved

I found it myself, Just removing * from my above grep command will work :)
wasimxe

a little progress :)

ok, I modified powershell extension to download files from clipboard

ForEach ($line in $($remotePaths -split "`r`n")){

    Write-Host "Downloading $line..."
    $session.GetFiles("$line", (Join-Path $localPath "*")).Check()
}


Problem: It required absolute path, I guess powershell doesn't support getting current working directory from GUI. So I modified grep command to print full path.

grep "astra_blog_layout_class" -rlHm1  * ${PWD}


Problem Again: This grep command returns one file two times, one with relative path and other with absolute path. When this clipboard run with extension, code stop at first error of file not found from server (because first file path was relative)

Screenshot: https://prnt.sc/lvbt51
Expected Solution: How can make this grep command only return files with absolute paths?
wasimxe

Grep Download Found files only

My screenshot with my question :)
https://prnt.sc/lvaik4

Somehow can I download only files found from grep?