Batch file - copying specified PDF's to new folder

SuperFerret

Well-known Member
Joined
Mar 2, 2009
Messages
515
Hi there,

I'm trying to create/find a batch file. We regularly get requests for large numbers of Pdf's for item specifications. These are all kept in a folder on the S drive, and I need to copy certain ones (100 or so) to a new folder AAAA on my desktop.

I have no idea whereabouts to start so any help or nudges in the right direction are appreciated!

Thanks in advance
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
The first step would be getting correct syntax for bat file usage.

1] Windows | Run | "cmd" and then hit OK to start command prompt.

2] To get the help needed with the specific command type:
either: help copy
or: copy/?
Note: in above case it is copy command that you'd be wanting

3] If you want this as output so that you read comfortably then
use: copy/?>C:\CopyHelp.txt
This will create a file named CopyHelp.txt on C drive.

4] You will need to specify both locations (i.e. Source and Destination) for copying.

Finally, you will end up with a syntax like:
Copy "S:\Some Folder\myFile.pdf" "C:\MyFolder\myFile.pdf"

To write this syntax for specific files you can use Excel.

Or not so long back, I had worked out a code for writing a batch file through excel (instead of filecopy command). Which you can see here.

DOS is really good for some cases. So you can dig deeper. Good luck.
 
Upvote 0
Thanks taurean, going to give this all a read...got the samples from the link too. Hoping I can understand it before I have to use it, currently reading it looking like this :huh:

I will let you know I get on!
 
Upvote 0

Forum statistics

Threads
1,225,617
Messages
6,186,017
Members
453,334
Latest member
Prakash Jha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top