Computing.Net > Forums > Programming > Batch Copy/Paste

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch Copy/Paste

Reply to Message Icon

Name: Mark K
Date: January 13, 2006 at 10:32:57 Pacific
OS: windows 2000
CPU/Ram: 512
Comment:

I have an FTP that dumps PDF files into a directory on my server. The first 6 digits of the PDF file is the account number. I want to copy the file 123456abcd.pdf to a directory called 123456. Any thoughts? The account number will be different on every file.

Mark K



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: January 13, 2006 at 11:13:48 Pacific
Reply:

Try this:

::== copyPDFs.bat
@echo off

setlocal
for %%P in (*.pdf) do call :copier %%P
goto :eof

:copier

set workfile=%1
set destDIR=%workfile:~0,6%
xcopy /y %1 %destDIR%\ > nul
:: DONE



If at first you don't succeed, you're about average.

M2


0
Reply to Message Icon

Related Posts

See More


backing up Oracle DB with... C++ Help - rdbuf()



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch Copy/Paste

Copy/Paste bug with IE6 www.computing.net/answers/programming/copypaste-bug-with-ie6/5941.html

Batch Copy My Documents www.computing.net/answers/programming/batch-copy-my-documents/15214.html

right click and copy paste not work www.computing.net/answers/programming/right-click-and-copy-paste-not-work/17468.html