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

Page 3 of 4 FirstFirst 1234 LastLast

  1. Posts : 456
    Windows 10
       #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 Computer


  2. Posts : 5
    windows 10
       #22

    Bree said:
    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?
    How Do I select multiple files in a folder from a list of file names-xx1.jpg
    How Do I select multiple files in a folder from a list of file names-xx2.jpg
      My Computer


  3. Posts : 1,223
    W10-Pro 22H2
       #23

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


  4. Posts : 456
    Windows 10
       #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 Computer


  5. Posts : 5
    windows 10
       #25

    ricardobohner said:
    @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 Computer


  6. Posts : 5
    windows 10
       #26

    ricardobohner said:
    @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 Computer


  7. Posts : 31,666
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #27

    malkasun said:
    my file name have spaces. what to do that?
    malkasun said:
    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 Computers


  8. Posts : 5
    windows 10
       #28

    Bree said:
    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 Computer


  9. Posts : 1
    windows 10
       #29

    Samuria said:
    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 Computer


  10. Posts : 1
    win7
       #30

    Bree said:
    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 Computer


 

  Related Discussions
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 16:25.
Find Us




Windows 10 Forums