Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Copying multiple files in a list, from one folder to another...

29 May 2014   #11
ealkire

Windows 7 x64
 
 

Yay!!!!!!!

Thanks, that worked!!


My System SpecsSystem Spec
.
29 May 2014   #12
UsernameIssues

W7 Pro SP1 64bit
 
 

Glad that it worked for you :-)
My System SpecsSystem Spec
30 May 2014   #13
ealkire

Windows 7 x64
 
 

Hi,

I tried doing another list of photos, and it didnt work for a few pictures.

I know for sure that the photos are in the folder I was searching (because i was doing this as a sort of test), but it came up with a box that said "could not find..."

any idea why it would do that?

It found other photos in the folder, but couldn't find some of them.
My System SpecsSystem Spec
.

30 May 2014   #14
UsernameIssues

W7 Pro SP1 64bit
 
 

Bummer :-(

I've sent you a PM so that you can share some file name info that you might not want in a public thread.

You can use the link in the upper left corner of this web page to get to the PM system:

Copying multiple files in a list, from one folder to another...-pm.png


My System SpecsSystem Spec
10 Sep 2014   #15
rcdev

window 7 professional x64
 
 

Great! this works for me too. How about if I wanna find photos under a subfolder? for example, main folder is "Photomain" and I have subfolder "photosub". My list includes photo names for both main and sub folder.
My System SpecsSystem Spec
12 Oct 2014   #16
UsernameIssues

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by rcdev View Post
Great! this works for me too. How about if I wanna find photos under a subfolder? for example, main folder is "Photomain" and I have subfolder "photosub". My list includes photo names for both main and sub folder.
Sorry for the late reply.

Having all of the photos in one folder handles the issue of duplicate file names.
e.g. there might have files in these paths on the hard drive:
...\photomain\image12.png
...\photomain\photosub\image58.png
...\photomain\photosub2\image58.png

If your list of files to copy included image58.png, should the script just silently copy the first match found or warn you that two or more files were found with the name image58.png? If image58.png is the same photo that is stored in two locations, then copying the first one found is not a problem. But, if the images are different and you really meant to copy the file located in subfolder2, then copying the first file found is a problem.

And then there is the recursion level: How many sub-folder levels should be searched? 2? 30?

It is possible to include sub-folders in the search/copy script, but it would take me too long to write/debug such code. If you still need a script that will handle sub-folders, then you can join AutoIt's forum and ask for help with creating such a script. But be warned, I've seen members of that forum be rude to newcomers. (Rude as in cursing, name calling, belittling ...) Your experience might vary.
My System SpecsSystem Spec
02 Dec 2014   #17
Julytion

Window 7
 
 

Hi RCDEV,
Did you find a way to search sub folders?
It would save me a lot of time if it was possible to search in sub folders.
I tried to look into the Microit forum but it's all giberous to me!!! Help!
My System SpecsSystem Spec
08 Sep 2016   #18
goofybt

Windows 7 64 bit
 
 

UsernameIssues I like the Autoit software you recommended but i am having problems editing the scrip to work for my needs and wonder if you could help?

I'm not moving photos, I need to copy file from a large master list into a separate folder. The source files are on our work network. I have created a .txt list but the scrip is giving me fits. I would like the scrip to ask me for a list and source location of files and a destination for the files. The list will be local (desktop) and the source and destination would be network location.

Thanks for anyhelp at all!
My System SpecsSystem Spec
08 Sep 2016   #19
UsernameIssues

W7 Pro SP1 64bit
 
 

Try this code:
Code:
Opt("TrayIconDebug", 1)

$S_running = "find-&-copy-files" ;name the script
If WinExists($S_running) Then
    MsgBox(0, "AutoIt", "The script to find & copy files is already running")
    Exit
EndIf
AutoItWinSetTitle($S_running)

$FileName = FileOpenDialog("Select the file that contains the list of files to find & copy", "C:\temp\", "Text File (*.txt)")
If @error Then Exit

$FileNameArray = StringSplit(FileRead($FileName), @CRLF, 1)

$SourceFolder = FileSelectFolder("Select the source folder.", "c:\temp\s")
If @error Then Exit

$DestinationFolder = FileSelectFolder("Select the destination folder.", "c:\temp\d")
If @error Then Exit

$search = FileFindFirstFile($SourceFolder & "\*.*")
If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")
    Exit
EndIf

While 1
    Local $file = FileFindNextFile($search)
    If @error Then ExitLoop

    For $i = 1 To $FileNameArray[0]
        If $file = $FileNameArray[$i] Then
            FileCopy($SourceFolder & "\" & $file, $DestinationFolder & "\")
            $FileNameArray[$i] = ""
        EndIf
    Next
WEnd

For $i = 1 To $FileNameArray[0]
    If $FileNameArray[$i] <> "" Then
        InputBox("Error", "Could not find:", $FileNameArray[$i])
        If @error = 1 Then Exit
    EndIf
Next

Run("explorer.exe " & $DestinationFolder & "\")
I would suggest that you change this part...
"C:\temp\"
...of this line:
Code:
$FileName = FileOpenDialog("Select the file that contains the list of  files to find & copy", "C:\temp\", "Text File (*.txt)")
to the folder where you will keep the text list of the files to be copied. That should save you some navigation.

The same is true for this part...
"c:\temp\s"
...of this line:
Code:
$SourceFolder = FileSelectFolder("Select the source folder.", "c:\temp\s")
...and this part...
"c:\temp\d"
...of this line:
Code:
$DestinationFolder = FileSelectFolder("Select the destination folder.", "c:\temp\d")
You will be changing those last two lines to point to your network resource.
You can use a mapped drive letters or UNC* paths.

* \\servername\sharename\folder
My System SpecsSystem Spec
08 Sep 2016   #20
UsernameIssues

W7 Pro SP1 64bit
 
 

> I need to copy file from a large master list...
Is that large master list in an Excel spreadsheet?
If so, how are you currently making the TXT file to be used with the script?
My System SpecsSystem Spec
Reply

 Copying multiple files in a list, from one folder to another...




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
select/search multiple files from a list, copy and paste to new folder
I have a list of 1000 files names (photo files) from clients and need to find them in one folder which has 10000+ files in it.And my clients files list do not have the full photo name (only a part of file name, eg: the file name in my local disk is "403817-QTX0022-30763812_Q10Photo.jpeg" and name...
General Discussion
Missing files after copying folder to another drive
Hello all, I'm running a genuine copy of Windows 7 Ultimate. I just completed a fresh install (with MS's help) and now I'm reinstalling all my files and programs. I have copied the "My Documents" folder from a backup drive to another drive. However, I noticed that in the source drive there are...
General Discussion
How to copy multiple .wma files in different folders to single folder?
I need to 'extract' .wma files from within many different folders to a single, main folder. It looks like this: Main Folder>Artist>Album>Track (.wma) but there are many artists. I want to get all the tracks from within the two subfolders into a single folder. I've searched around online and haven't...
Music, Pictures & Video
Copying files into "Windows/System" folder used by XP Mode
Hello Everyone, I am working in Win7 XP Mode, trying to install and run a Microsoft utility called: WT1230: Batch File Converter for PowerPoint for Windows 95 (see WT1230: Batch File Converter for PowerPoint for Windows 95 ) Yes, the utility is intended for Win95, but I'd like to see if...
Virtualization
List Files in Folder With Ignore List
Edit: Sorry I made the topic an forgot to change the title. Should be: "List Files in Folder With Ignore List" or something along those lines. I'm a game server admin. What I want to do is generate a text file which will be used when I launch the server. An example of the text file I want to...
General Discussion
Copying Files Within Source Folder
This is something small, but kinda annoying for me. In XP, if I copied and pasted a file within the same folder, the file name would be "copy of file.ext". this was great for me cause I could easily sort the files by name and then move them to the final destination folder. But now in Win7, the...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:31.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App