Windows 7 - How to locate a list of files by filename and copy them into a folder












0















I have a list of 200 filenames. I need to find these files, which are located in different subfolders, by their filename and copy them into one separate folder. I'm using Windows 7. How do I do that?



Thanks,
Natalya










share|improve this question




















  • 1





    You can use a recursive file search using powershell which is built into Windows 7.

    – Ramhound
    May 27 '15 at 18:49
















0















I have a list of 200 filenames. I need to find these files, which are located in different subfolders, by their filename and copy them into one separate folder. I'm using Windows 7. How do I do that?



Thanks,
Natalya










share|improve this question




















  • 1





    You can use a recursive file search using powershell which is built into Windows 7.

    – Ramhound
    May 27 '15 at 18:49














0












0








0








I have a list of 200 filenames. I need to find these files, which are located in different subfolders, by their filename and copy them into one separate folder. I'm using Windows 7. How do I do that?



Thanks,
Natalya










share|improve this question
















I have a list of 200 filenames. I need to find these files, which are located in different subfolders, by their filename and copy them into one separate folder. I'm using Windows 7. How do I do that?



Thanks,
Natalya







windows-7 command-line






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 27 '15 at 20:25









Julian Knight

12.9k11535




12.9k11535










asked May 27 '15 at 18:44









NatalyaNatalya

111




111








  • 1





    You can use a recursive file search using powershell which is built into Windows 7.

    – Ramhound
    May 27 '15 at 18:49














  • 1





    You can use a recursive file search using powershell which is built into Windows 7.

    – Ramhound
    May 27 '15 at 18:49








1




1





You can use a recursive file search using powershell which is built into Windows 7.

– Ramhound
May 27 '15 at 18:49





You can use a recursive file search using powershell which is built into Windows 7.

– Ramhound
May 27 '15 at 18:49










2 Answers
2






active

oldest

votes


















0














My suggestion is to go to Ninite.com, and download the freeware tool called "Everything". it's a simple windows search tool. After install, give it 5 minutes or so to index your files.



In the search field, type your search term, and you'll get instant results, like you do on Google. Upon seeing the results, you can then manipulate the files directly in the Everything search window, such as you can in Windows explorer. You could 'select all' and then copy them, and then in Win Explorer go to the folder you want them and paste them.



Everything is a really nice tool. You don't even need to type the entire filename, just part of it, e.g. 'eag mp3' will return all MP3's with 'eag' in the filename, such as 'eagles - song name.mp3'






share|improve this answer
























  • Thanks, I downloaded Everything. However, it doesn't return any results when I put a list of filenames in the search (tried comma delimited, OR deliminted, space delimited) which is what I was hoping to do. There's an Open File List option but it expects a file with the *.efu extension and I'm not even sure that this is what I'm looking for...

    – Natalya
    May 27 '15 at 20:56











  • @Natalya, here is the page with the search methods. I know Everything is pretty powerful, and I believe even supports regex searching. voidtools.com/support/everything/searching

    – user438353
    May 27 '15 at 21:00













  • Why go to Ninite when Everything is available from its own site as both installer and portable versions?

    – Karan
    May 27 '15 at 21:39



















0














Here you go. Do the dry run first. Read comments carefully.



The file fullfilenames.txt will persist so you have a record of each file that was found. If you need to run this more than once and want to keep the file either move or rename it.



A logfile 'movelog.txt' will be created. As above, either move or rename it if you want to keep it after each run.



# Set your search directory and destination directory
$destdir = "[destination for files]"
$searchdir = "[top dir of search path]"

# Create empty file to contain the full path info for each file
echo $null > fullfilenames.txt
# Create array from your list of filenames
$filenames = Get-Content filenames.txt
# For each file in array of filenames get fullpath and assign var $fullname
foreach ($file in $filenames) {
$fullname = Get-ChildItem $searchdir | Where-Object {$_.PSIsContainer -eq $False -and ($_.Name) -eq $file} | ForEach-Object {$_.FullName}
# Add full path of file to fullfilenames.txt
echo $fullname >> fullfilenames.txt
# Uncomment next two lines for troubleshooting & dry run
#echo $file
#Write-Host $fullname
}

# Create array from new list of files with full path info and then move each file to destination.
# For troubleshooting & dry run, comment out following two lines.
$filenames = Get-Content fullfilenames.txt
echo $null > movelog.txt
foreach ( $file in $filenames ) {
Move-Item $file $destdir
# Log success/fail of each move
echo "$(Get-Date -f o) $? $file" >> movelog.txt
}


Note: This is a powershell script. Save it as whatever.ps1 and run it in the PowerShell console.



Enjoy






share|improve this answer


























  • Thanks, this worked! I ended up simplifying this file because I already had a text file with filenames including full path -

    – Natalya
    May 27 '15 at 23:12











  • $destdir =C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFiles" $searchdir = "C:DocsSSISSSISPackageMovetoEnwisen04SSIS-DTSSSIS-DTS" # For troubleshooting & dry run, comment out following two lines. $filenames = Get-Content C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFilesDTSConfigFilesFullPath.txt echo $null > movelog.txt foreach ( $file in $filenames ) { Move-Item $file $destdir # Log success/fail of each move echo "$(Get-Date -f o) $? $file" >> movelog.txt

    – Natalya
    May 27 '15 at 23:15











  • Perfect. Glad to have helped.

    – Alex Atkinson
    May 27 '15 at 23:17











  • Don't forget to mark it as the correct answer. Thanks.

    – Alex Atkinson
    May 28 '15 at 1:11











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f920344%2fwindows-7-how-to-locate-a-list-of-files-by-filename-and-copy-them-into-a-folde%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














My suggestion is to go to Ninite.com, and download the freeware tool called "Everything". it's a simple windows search tool. After install, give it 5 minutes or so to index your files.



In the search field, type your search term, and you'll get instant results, like you do on Google. Upon seeing the results, you can then manipulate the files directly in the Everything search window, such as you can in Windows explorer. You could 'select all' and then copy them, and then in Win Explorer go to the folder you want them and paste them.



Everything is a really nice tool. You don't even need to type the entire filename, just part of it, e.g. 'eag mp3' will return all MP3's with 'eag' in the filename, such as 'eagles - song name.mp3'






share|improve this answer
























  • Thanks, I downloaded Everything. However, it doesn't return any results when I put a list of filenames in the search (tried comma delimited, OR deliminted, space delimited) which is what I was hoping to do. There's an Open File List option but it expects a file with the *.efu extension and I'm not even sure that this is what I'm looking for...

    – Natalya
    May 27 '15 at 20:56











  • @Natalya, here is the page with the search methods. I know Everything is pretty powerful, and I believe even supports regex searching. voidtools.com/support/everything/searching

    – user438353
    May 27 '15 at 21:00













  • Why go to Ninite when Everything is available from its own site as both installer and portable versions?

    – Karan
    May 27 '15 at 21:39
















0














My suggestion is to go to Ninite.com, and download the freeware tool called "Everything". it's a simple windows search tool. After install, give it 5 minutes or so to index your files.



In the search field, type your search term, and you'll get instant results, like you do on Google. Upon seeing the results, you can then manipulate the files directly in the Everything search window, such as you can in Windows explorer. You could 'select all' and then copy them, and then in Win Explorer go to the folder you want them and paste them.



Everything is a really nice tool. You don't even need to type the entire filename, just part of it, e.g. 'eag mp3' will return all MP3's with 'eag' in the filename, such as 'eagles - song name.mp3'






share|improve this answer
























  • Thanks, I downloaded Everything. However, it doesn't return any results when I put a list of filenames in the search (tried comma delimited, OR deliminted, space delimited) which is what I was hoping to do. There's an Open File List option but it expects a file with the *.efu extension and I'm not even sure that this is what I'm looking for...

    – Natalya
    May 27 '15 at 20:56











  • @Natalya, here is the page with the search methods. I know Everything is pretty powerful, and I believe even supports regex searching. voidtools.com/support/everything/searching

    – user438353
    May 27 '15 at 21:00













  • Why go to Ninite when Everything is available from its own site as both installer and portable versions?

    – Karan
    May 27 '15 at 21:39














0












0








0







My suggestion is to go to Ninite.com, and download the freeware tool called "Everything". it's a simple windows search tool. After install, give it 5 minutes or so to index your files.



In the search field, type your search term, and you'll get instant results, like you do on Google. Upon seeing the results, you can then manipulate the files directly in the Everything search window, such as you can in Windows explorer. You could 'select all' and then copy them, and then in Win Explorer go to the folder you want them and paste them.



Everything is a really nice tool. You don't even need to type the entire filename, just part of it, e.g. 'eag mp3' will return all MP3's with 'eag' in the filename, such as 'eagles - song name.mp3'






share|improve this answer













My suggestion is to go to Ninite.com, and download the freeware tool called "Everything". it's a simple windows search tool. After install, give it 5 minutes or so to index your files.



In the search field, type your search term, and you'll get instant results, like you do on Google. Upon seeing the results, you can then manipulate the files directly in the Everything search window, such as you can in Windows explorer. You could 'select all' and then copy them, and then in Win Explorer go to the folder you want them and paste them.



Everything is a really nice tool. You don't even need to type the entire filename, just part of it, e.g. 'eag mp3' will return all MP3's with 'eag' in the filename, such as 'eagles - song name.mp3'







share|improve this answer












share|improve this answer



share|improve this answer










answered May 27 '15 at 19:54







user438353




















  • Thanks, I downloaded Everything. However, it doesn't return any results when I put a list of filenames in the search (tried comma delimited, OR deliminted, space delimited) which is what I was hoping to do. There's an Open File List option but it expects a file with the *.efu extension and I'm not even sure that this is what I'm looking for...

    – Natalya
    May 27 '15 at 20:56











  • @Natalya, here is the page with the search methods. I know Everything is pretty powerful, and I believe even supports regex searching. voidtools.com/support/everything/searching

    – user438353
    May 27 '15 at 21:00













  • Why go to Ninite when Everything is available from its own site as both installer and portable versions?

    – Karan
    May 27 '15 at 21:39



















  • Thanks, I downloaded Everything. However, it doesn't return any results when I put a list of filenames in the search (tried comma delimited, OR deliminted, space delimited) which is what I was hoping to do. There's an Open File List option but it expects a file with the *.efu extension and I'm not even sure that this is what I'm looking for...

    – Natalya
    May 27 '15 at 20:56











  • @Natalya, here is the page with the search methods. I know Everything is pretty powerful, and I believe even supports regex searching. voidtools.com/support/everything/searching

    – user438353
    May 27 '15 at 21:00













  • Why go to Ninite when Everything is available from its own site as both installer and portable versions?

    – Karan
    May 27 '15 at 21:39

















Thanks, I downloaded Everything. However, it doesn't return any results when I put a list of filenames in the search (tried comma delimited, OR deliminted, space delimited) which is what I was hoping to do. There's an Open File List option but it expects a file with the *.efu extension and I'm not even sure that this is what I'm looking for...

– Natalya
May 27 '15 at 20:56





Thanks, I downloaded Everything. However, it doesn't return any results when I put a list of filenames in the search (tried comma delimited, OR deliminted, space delimited) which is what I was hoping to do. There's an Open File List option but it expects a file with the *.efu extension and I'm not even sure that this is what I'm looking for...

– Natalya
May 27 '15 at 20:56













@Natalya, here is the page with the search methods. I know Everything is pretty powerful, and I believe even supports regex searching. voidtools.com/support/everything/searching

– user438353
May 27 '15 at 21:00







@Natalya, here is the page with the search methods. I know Everything is pretty powerful, and I believe even supports regex searching. voidtools.com/support/everything/searching

– user438353
May 27 '15 at 21:00















Why go to Ninite when Everything is available from its own site as both installer and portable versions?

– Karan
May 27 '15 at 21:39





Why go to Ninite when Everything is available from its own site as both installer and portable versions?

– Karan
May 27 '15 at 21:39













0














Here you go. Do the dry run first. Read comments carefully.



The file fullfilenames.txt will persist so you have a record of each file that was found. If you need to run this more than once and want to keep the file either move or rename it.



A logfile 'movelog.txt' will be created. As above, either move or rename it if you want to keep it after each run.



# Set your search directory and destination directory
$destdir = "[destination for files]"
$searchdir = "[top dir of search path]"

# Create empty file to contain the full path info for each file
echo $null > fullfilenames.txt
# Create array from your list of filenames
$filenames = Get-Content filenames.txt
# For each file in array of filenames get fullpath and assign var $fullname
foreach ($file in $filenames) {
$fullname = Get-ChildItem $searchdir | Where-Object {$_.PSIsContainer -eq $False -and ($_.Name) -eq $file} | ForEach-Object {$_.FullName}
# Add full path of file to fullfilenames.txt
echo $fullname >> fullfilenames.txt
# Uncomment next two lines for troubleshooting & dry run
#echo $file
#Write-Host $fullname
}

# Create array from new list of files with full path info and then move each file to destination.
# For troubleshooting & dry run, comment out following two lines.
$filenames = Get-Content fullfilenames.txt
echo $null > movelog.txt
foreach ( $file in $filenames ) {
Move-Item $file $destdir
# Log success/fail of each move
echo "$(Get-Date -f o) $? $file" >> movelog.txt
}


Note: This is a powershell script. Save it as whatever.ps1 and run it in the PowerShell console.



Enjoy






share|improve this answer


























  • Thanks, this worked! I ended up simplifying this file because I already had a text file with filenames including full path -

    – Natalya
    May 27 '15 at 23:12











  • $destdir =C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFiles" $searchdir = "C:DocsSSISSSISPackageMovetoEnwisen04SSIS-DTSSSIS-DTS" # For troubleshooting & dry run, comment out following two lines. $filenames = Get-Content C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFilesDTSConfigFilesFullPath.txt echo $null > movelog.txt foreach ( $file in $filenames ) { Move-Item $file $destdir # Log success/fail of each move echo "$(Get-Date -f o) $? $file" >> movelog.txt

    – Natalya
    May 27 '15 at 23:15











  • Perfect. Glad to have helped.

    – Alex Atkinson
    May 27 '15 at 23:17











  • Don't forget to mark it as the correct answer. Thanks.

    – Alex Atkinson
    May 28 '15 at 1:11
















0














Here you go. Do the dry run first. Read comments carefully.



The file fullfilenames.txt will persist so you have a record of each file that was found. If you need to run this more than once and want to keep the file either move or rename it.



A logfile 'movelog.txt' will be created. As above, either move or rename it if you want to keep it after each run.



# Set your search directory and destination directory
$destdir = "[destination for files]"
$searchdir = "[top dir of search path]"

# Create empty file to contain the full path info for each file
echo $null > fullfilenames.txt
# Create array from your list of filenames
$filenames = Get-Content filenames.txt
# For each file in array of filenames get fullpath and assign var $fullname
foreach ($file in $filenames) {
$fullname = Get-ChildItem $searchdir | Where-Object {$_.PSIsContainer -eq $False -and ($_.Name) -eq $file} | ForEach-Object {$_.FullName}
# Add full path of file to fullfilenames.txt
echo $fullname >> fullfilenames.txt
# Uncomment next two lines for troubleshooting & dry run
#echo $file
#Write-Host $fullname
}

# Create array from new list of files with full path info and then move each file to destination.
# For troubleshooting & dry run, comment out following two lines.
$filenames = Get-Content fullfilenames.txt
echo $null > movelog.txt
foreach ( $file in $filenames ) {
Move-Item $file $destdir
# Log success/fail of each move
echo "$(Get-Date -f o) $? $file" >> movelog.txt
}


Note: This is a powershell script. Save it as whatever.ps1 and run it in the PowerShell console.



Enjoy






share|improve this answer


























  • Thanks, this worked! I ended up simplifying this file because I already had a text file with filenames including full path -

    – Natalya
    May 27 '15 at 23:12











  • $destdir =C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFiles" $searchdir = "C:DocsSSISSSISPackageMovetoEnwisen04SSIS-DTSSSIS-DTS" # For troubleshooting & dry run, comment out following two lines. $filenames = Get-Content C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFilesDTSConfigFilesFullPath.txt echo $null > movelog.txt foreach ( $file in $filenames ) { Move-Item $file $destdir # Log success/fail of each move echo "$(Get-Date -f o) $? $file" >> movelog.txt

    – Natalya
    May 27 '15 at 23:15











  • Perfect. Glad to have helped.

    – Alex Atkinson
    May 27 '15 at 23:17











  • Don't forget to mark it as the correct answer. Thanks.

    – Alex Atkinson
    May 28 '15 at 1:11














0












0








0







Here you go. Do the dry run first. Read comments carefully.



The file fullfilenames.txt will persist so you have a record of each file that was found. If you need to run this more than once and want to keep the file either move or rename it.



A logfile 'movelog.txt' will be created. As above, either move or rename it if you want to keep it after each run.



# Set your search directory and destination directory
$destdir = "[destination for files]"
$searchdir = "[top dir of search path]"

# Create empty file to contain the full path info for each file
echo $null > fullfilenames.txt
# Create array from your list of filenames
$filenames = Get-Content filenames.txt
# For each file in array of filenames get fullpath and assign var $fullname
foreach ($file in $filenames) {
$fullname = Get-ChildItem $searchdir | Where-Object {$_.PSIsContainer -eq $False -and ($_.Name) -eq $file} | ForEach-Object {$_.FullName}
# Add full path of file to fullfilenames.txt
echo $fullname >> fullfilenames.txt
# Uncomment next two lines for troubleshooting & dry run
#echo $file
#Write-Host $fullname
}

# Create array from new list of files with full path info and then move each file to destination.
# For troubleshooting & dry run, comment out following two lines.
$filenames = Get-Content fullfilenames.txt
echo $null > movelog.txt
foreach ( $file in $filenames ) {
Move-Item $file $destdir
# Log success/fail of each move
echo "$(Get-Date -f o) $? $file" >> movelog.txt
}


Note: This is a powershell script. Save it as whatever.ps1 and run it in the PowerShell console.



Enjoy






share|improve this answer















Here you go. Do the dry run first. Read comments carefully.



The file fullfilenames.txt will persist so you have a record of each file that was found. If you need to run this more than once and want to keep the file either move or rename it.



A logfile 'movelog.txt' will be created. As above, either move or rename it if you want to keep it after each run.



# Set your search directory and destination directory
$destdir = "[destination for files]"
$searchdir = "[top dir of search path]"

# Create empty file to contain the full path info for each file
echo $null > fullfilenames.txt
# Create array from your list of filenames
$filenames = Get-Content filenames.txt
# For each file in array of filenames get fullpath and assign var $fullname
foreach ($file in $filenames) {
$fullname = Get-ChildItem $searchdir | Where-Object {$_.PSIsContainer -eq $False -and ($_.Name) -eq $file} | ForEach-Object {$_.FullName}
# Add full path of file to fullfilenames.txt
echo $fullname >> fullfilenames.txt
# Uncomment next two lines for troubleshooting & dry run
#echo $file
#Write-Host $fullname
}

# Create array from new list of files with full path info and then move each file to destination.
# For troubleshooting & dry run, comment out following two lines.
$filenames = Get-Content fullfilenames.txt
echo $null > movelog.txt
foreach ( $file in $filenames ) {
Move-Item $file $destdir
# Log success/fail of each move
echo "$(Get-Date -f o) $? $file" >> movelog.txt
}


Note: This is a powershell script. Save it as whatever.ps1 and run it in the PowerShell console.



Enjoy







share|improve this answer














share|improve this answer



share|improve this answer








edited May 27 '15 at 21:39

























answered May 27 '15 at 21:16









Alex AtkinsonAlex Atkinson

2,735913




2,735913













  • Thanks, this worked! I ended up simplifying this file because I already had a text file with filenames including full path -

    – Natalya
    May 27 '15 at 23:12











  • $destdir =C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFiles" $searchdir = "C:DocsSSISSSISPackageMovetoEnwisen04SSIS-DTSSSIS-DTS" # For troubleshooting & dry run, comment out following two lines. $filenames = Get-Content C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFilesDTSConfigFilesFullPath.txt echo $null > movelog.txt foreach ( $file in $filenames ) { Move-Item $file $destdir # Log success/fail of each move echo "$(Get-Date -f o) $? $file" >> movelog.txt

    – Natalya
    May 27 '15 at 23:15











  • Perfect. Glad to have helped.

    – Alex Atkinson
    May 27 '15 at 23:17











  • Don't forget to mark it as the correct answer. Thanks.

    – Alex Atkinson
    May 28 '15 at 1:11



















  • Thanks, this worked! I ended up simplifying this file because I already had a text file with filenames including full path -

    – Natalya
    May 27 '15 at 23:12











  • $destdir =C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFiles" $searchdir = "C:DocsSSISSSISPackageMovetoEnwisen04SSIS-DTSSSIS-DTS" # For troubleshooting & dry run, comment out following two lines. $filenames = Get-Content C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFilesDTSConfigFilesFullPath.txt echo $null > movelog.txt foreach ( $file in $filenames ) { Move-Item $file $destdir # Log success/fail of each move echo "$(Get-Date -f o) $? $file" >> movelog.txt

    – Natalya
    May 27 '15 at 23:15











  • Perfect. Glad to have helped.

    – Alex Atkinson
    May 27 '15 at 23:17











  • Don't forget to mark it as the correct answer. Thanks.

    – Alex Atkinson
    May 28 '15 at 1:11

















Thanks, this worked! I ended up simplifying this file because I already had a text file with filenames including full path -

– Natalya
May 27 '15 at 23:12





Thanks, this worked! I ended up simplifying this file because I already had a text file with filenames including full path -

– Natalya
May 27 '15 at 23:12













$destdir =C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFiles" $searchdir = "C:DocsSSISSSISPackageMovetoEnwisen04SSIS-DTSSSIS-DTS" # For troubleshooting & dry run, comment out following two lines. $filenames = Get-Content C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFilesDTSConfigFilesFullPath.txt echo $null > movelog.txt foreach ( $file in $filenames ) { Move-Item $file $destdir # Log success/fail of each move echo "$(Get-Date -f o) $? $file" >> movelog.txt

– Natalya
May 27 '15 at 23:15





$destdir =C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFiles" $searchdir = "C:DocsSSISSSISPackageMovetoEnwisen04SSIS-DTSSSIS-DTS" # For troubleshooting & dry run, comment out following two lines. $filenames = Get-Content C:DocsSSISSSISPackageMovetoEnwisen04AListOfEffectedDTSConfigFilesDTSConfigFilesFullPath.txt echo $null > movelog.txt foreach ( $file in $filenames ) { Move-Item $file $destdir # Log success/fail of each move echo "$(Get-Date -f o) $? $file" >> movelog.txt

– Natalya
May 27 '15 at 23:15













Perfect. Glad to have helped.

– Alex Atkinson
May 27 '15 at 23:17





Perfect. Glad to have helped.

– Alex Atkinson
May 27 '15 at 23:17













Don't forget to mark it as the correct answer. Thanks.

– Alex Atkinson
May 28 '15 at 1:11





Don't forget to mark it as the correct answer. Thanks.

– Alex Atkinson
May 28 '15 at 1:11


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f920344%2fwindows-7-how-to-locate-a-list-of-files-by-filename-and-copy-them-into-a-folde%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Сан-Квентин

8-я гвардейская общевойсковая армия

Алькесар