How Do I select multiple files in a folder from a list of file names Solved

Page 3 of 3 FirstFirst 123
  1.    #21

    If the files that you want to copy have something unique in common in the file name you could just use the copy comand:

    copy *075p*.jpg targetfolder

    If they files to be copied have a specific date, size or atribute you could use robocopy to copy the files (please use robocopy /? to see the options).
      My ComputerSystem Spec

  2.    #22

    Bree said: View Post
    your command line was:
    FOR /F "delims=" %N in listflyer.txt do COPY "%%N" I:\Youtube download\Photoshop Tutorial Poster flyer

    Compare that with the example in Post #11 and you'll spot a few differences.

    You left out the brackets inside the FOR...DO part: (listflyer.txt) which is why listflyer.txt was unexpected.

    You used %N then %%N in the same line. On a command line both should only have one %. Only in a batch file do you have use two %% but in that case both shoud be %%N.

    The destination name includes spaces, so it needs quotes around it: "I:\Youtube download\Photoshop Tutorial Poster flyer"


    So the corrected command line you should have typed is:
    FOR /F "delims=" %N in (listflyer.txt) do COPY "%N" "I:\Youtube download\Photoshop Tutorial Poster flyer"

    If you put the command in a .bat file to run it from there, then you need to use %%N instead of %N because the first % gets stripped off by the command interpreter as it runs the file.
    my file name have spaces. what to do that?
    Click image for larger version. 

Name:	xx1.JPG 
Views:	48 
Size:	74.6 KB 
ID:	226902
    Click image for larger version. 

Name:	xx2.JPG 
Views:	48 
Size:	80.1 KB 
ID:	226903
      My ComputerSystem Spec

  3.    #23

    Is Rick's problem the space in the destination path?
      My ComputerSystem Spec

  4.    #24

    @malkasun Your text file seems to have wrong slashes windows usually uses backslash for folder structure but in the text file there are forward slashes

    I:\youtube download/..
      My ComputerSystem Spec

  5.    #25

    ricardobohner said: View Post
    @malkasun Your text file seems to have wrong slashes windows usually uses backslash for folder structure but in the text file there are forward slashes

    I:\youtube download/..
    thank you very much..yeah..!!!! it's coping..
    what to do for files move to folder
      My ComputerSystem Spec

  6.    #26

    ricardobohner said: View Post
    @malkasun Your text file seems to have wrong slashes windows usually uses backslash for folder structure but in the text file there are forward slashes

    I:\youtube download/..

    thankyou.. working superb
    FOR /F "delims=" %N in (listflyer.txt) do MOVE "%N" "I:\youtube download\Photoshop Tutorial Poster Flyer"
      My ComputerSystem Spec

  7. Bree's Avatar
    Posts : 10,811
    10 Home x64 (1809) (10 Pro on 2nd pc)
       #27

    malkasun said: View Post
    my file name have spaces. what to do that?
    malkasun said: View Post
    thankyou.. working superb
    FOR /F "delims=" %N in (listflyer.txt) do MOVE "%N" "I:\youtube download\Photoshop Tutorial Poster Flyer"
    Glad it's working. The command line has quotes around the second "%N" so that means the names in the text file can include spaces.
      My ComputersSystem Spec

  8.    #28

    Bree said: View Post
    Glad it's working. The command line has quotes around the second "%N" so that means the names in the text file can include spaces.
    Thanks Lot..
      My ComputerSystem Spec

  9.    #29

    Samuria said: View Post
    In the tx file write infront of the file name
    copy
    then after it c:\weretogo
    so if it was
    bat.jpg
    it will be

    copy bat.jog c:\myfolder

    you can copy and paste the txt simpler in excel

    then save the file as back.cmd in the folder containing all the files and run it
    This worked great to copy the files, is there perhaps a way to rename the file as well?
      My ComputerSystem Spec

  10.    #30

    Bree said: View Post
    Yes, create the target folder first.

    You can create the target folder anywhere you want as long as you use the full path in the FOR command. If you CD into the source folder and you have created the target folder is in the source folder too, then you just need to give its name.

    FOR /F "delims=" %N in (list.txt) do COPY "%N" Target
    This works great! Thank you! But how can I include the search in subfolders as well?
      My ComputerSystem Spec


 
Page 3 of 3 FirstFirst 123

Related Threads
Hi. Below link shows a method to do that, but its probably for older versions of windows. How to Copy a List of Files in a Windows Folder Into an Excel List | Chron.com In windows 10, when I Shift+right click on a folder to open the Powershell...
I have a problem with a program not saving preset data. Possibly due to harlink extenstion with only one piece of software. I use symbolic hardlinks on my system but I do not know if the following has any bearing on the issue with the software I...
I want to move pictures I have taken with my Windows 10 Tablet to an external usb. I can copy them one at a time, but I would like to be able to select several picture by hitting the ctrl key or the shift key, but when I bring up the on screen...
- Winkey, “cmd” - “cd e:\media\trainingvids” - “dir *.* /s /b /a -d > c:\temp\dork.txt” So, with that I'm opening a command prompt, changing to the correct directory, doing a directory listing of all files (including sub-directories (/s), no...
When I launch file explorer and get the home view, it is showing a bunch of filenames in Chinese characters (see attached screenshot) which it says are in the desktop folder. However there are no such files when I look at the desktop folder. WTF? ...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:28.
Find Us