Post a reply

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)


Topic review


Sure, it will.

Thanks prikryl for your reply.
But the problem here is that "same_file.txt" has same name in sub-folders but different contents.
Will the command you provided, download all the files to C:\Temp under their respective folder name? like C:\Temp\ABC\same_file.txt, C:\Temp\DEF\same_file.txt, C:\Temp\GHI\same_file.txt?

Any quick help would be much appreciated. Thanks!

Loop through sub-directories and get single file


I am using Window batch file to write a script using Idea is the following:

1. Connect to target (open
2. change remote directory to /fs/usb0/MyFolder (MyFolder has lot of subfolders like: ABC, DEF, GHI, JKL, etc. and each sub-folder has different files but one file name is same: same_file.txt). Directory structure looks like:
3. I want to copy all "same_file.txt" together folder name ( like ABC/same_file.txt) to a local folder (for example at: C:\Temp).

How can I use path mask or something else in Get command to make iterate in a loop on subdirectories and fetch only one file?
I used following but it does not work:

"get /fs/usb0/MyFolder/*/same_file.txt C:\Temp\*\same_file.txt .\"

Error listing directory '/fs/usb0/MyFolder/*'.
Could not retrieve directory listing
/fs/usb0/MyFolder/*/: No such file or directory.