Saved Bookmarks
| 1. |
Solve : Find and Move a File? |
|
Answer» Hi Firstly - Search a location C:/Folder1 for a file prefixed with letters eg CH12345 So you're searching inside folder1 for any file that begins with CH ? Quote Secondly - Send that file to another location ie C:/Folder2 and remove it from orignal location. for this you would do: Code: [Select]move /-y C:/Folder1\Ch12345 C:\Folder2 That's how it works if I'm not mistaken. You can't send an email using plain batch file. Use Blat. If you don't want to download blat do: Code: [Select]start mailto:[emailprotected] Which will open up the email window. But the user must attach the file himself and click send. Thanks So you're searching inside folder1 for any file that begins with CH ? Yesalso start mailto: works but opens OUTLOOK, how can i get to open lotus notes Quote how can i get to open lotus notes Well if this is a program, you just WRITE the path to lotus notes instead of writing start mailto:. If it is a web program, using start type the url (link, found in address bar), then it will open the default browser. Quote So you're searching inside folder1 for any file that begins with CH ? Yes. In that case, do this: Code: [Select]move /-y C:\Folder1\CH* C:\Folder2 Which the * represents a wild card. If I'm not mistaken, the wild card will represent... Anything really. Hope that helped. C:/ should be C:\ above.I always forget which way the slashes go.Hi Folks Thanks for the help. However How can I move Multiple Files to one location; Move all files prefixed with TE to new location move "C:\Admin\Test Process Batch Files\Source\TE*.zip" C:\Admin\Test Process Batch Files\Destination ERROR is: Cannot Move Multiple Files to Single File How can I work around this, as I will always have multiple files prefixed the same that need moving to same locationQuote from: petreli on March 03, 2009, 08:47:18 AM Hi Folks this way how you want to move files Code: [Select]C:\Admin\Test Process Batch Files\Destinationmeans that they will copy to file Destination but with no extension so you must show that you want copy to dictory Code: [Select]C:\Admin\Test Process Batch Files\Destination\Quote from: petreli on March 03, 2009, 08:47:18 AM Hi Folks the basic syntax of move is move filespec destination So you do Code: [Select]move "C:\Admin\Test Process Batch Files\Source\TE*.zip" "C:\Admin\Test Process Batch Files\Destination"Hi I have tried this, I think the error I am receiving is means I cannot move files of the same prefix to the same location? "Cannot move Multiple files to a Single file" is the error What i'm trying to do is move multiple files to the same location not fileHmmm Me thinks that Copy is a better option, SEEMS to work better, but have to delete the files from source folder, but is safer if theres a problemQuote from: petreli on March 05, 2009, 05:39:20 AM Hi Does the folder called Destination exist? Hi Dias de verano Yes destination file existsQuote from: petreli on March 06, 2009, 05:29:29 AM Hi Dias de verano That is not what I asked. Read my question again. |
|