Batch file to move files in Win7

September 16, 2010 at 19:49:19
Specs: Windows 7, 4 GB
What am I doing wrong with this batch file, running in Win7. Nothing happens when I run it. Am wanting to move all files containing 'avd' in file name to another folder, then am moving a batch of zip files to a folder. Eventually I will be deleting contents of C:\Docs\Import\Zip\MyFolder* below, but want to get the move right first. The folder name, MyFolder, will always have a different date at the end, so I'm hoping to be able to use MyFolder*. Thank you for any help,

move C:\Docs\Import\Zip\MyFolder*\*avd.xml "C:\Docs\Import\"
move C:\Docs\Import\*.zip "C:\Docs\Import\Zip\MyFolder*"

See More: Batch file to move files in Win7

Report •

September 17, 2010 at 00:13:16
The stars in the path won't fly. You need FOR loops.

Helping others achieve escape felicity


Report •

September 17, 2010 at 20:57:34
Thank you, I will research that. My sample was copied from the same method with wildcards in WinXP I use to move pdf's and for some reason it works for me there, I haven't learned about FOR loops yet and have alot to learn. I got rid of the date stamp at the end of the folder name, so I won't need a wildcard in the folder/path name, just file name. Thank you again.

Report •

September 18, 2010 at 17:37:10
Sorry, it turns out the sample directory/path I posted had no spaces in folder names, but in reality the actual names had spaces. Enclosed the complete directory path/filename in quotes and the MOVE command worked great. I should have posted a more accurate sample. Thank you for the help.

Report •

Related Solutions

Ask Question