DosTips.com

A Forum all about DOS Batch
It is currently 28 Sep 2016 11:03

All times are UTC-06:00




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: 09 Aug 2012 12:26 
Offline

Joined: 09 Aug 2012 12:21
Posts: 14
Hello All

Please help me in this regard

we receive zip files so we extract them and we get hundreds of word files in a folder and i want to divide them into subfolders each subfolder should contain 40 documents after separating them we need to convert word documents into PDF its taking time for separating them.


Top
   
PostPosted: 09 Aug 2012 12:42 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 5965
adill441 wrote:
we receive zip files so we extract them and we get hundreds of word files in a folder and i want to divide them into subfolders each subfolder should contain 40 documents


Try this: (untested)

Code:
@echo off
setlocal EnableExtensions EnableDelayedExpansion
set num=1
set c=0
for /f "delims=" %%a in ('dir *.doc /b') do (
if !c! LSS 40 (
      md "files!num!" 2>nul
      move "%%a" "files!num!"
   ) else (
      set /a num+=1
      set c=0
   )
set /a c+=1
)


Top
   
PostPosted: 09 Aug 2012 19:56 
Offline

Joined: 09 Aug 2012 12:21
Posts: 14
Thank You!!!! :D is there any thing by which we can change this word documents into PDF ?


Top
   
PostPosted: 09 Aug 2012 20:12 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 5965
Look here:

www.google.com.au/search?hl=en&q=conver ... gle+Search


Top
   
PostPosted: 09 Aug 2012 20:35 
Offline

Joined: 09 Aug 2012 12:21
Posts: 14
Hello Foxidrive

i have these software install C:\Program Files (x86)\PDFCreator and i cannot install any new softwate Please advise


Top
   
PostPosted: 09 Aug 2012 20:53 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 5965
I got this from the link above - try it from a cmd prompt and see if it works for you. If so without any prompts then a batch file can help.

Code:
"winword.exe" "file.doc" /mFilePrintDefault



I think you will need to set the default printer to be pdfcreator.


Top
   
PostPosted: 09 Aug 2012 21:57 
Offline

Joined: 09 Aug 2012 12:21
Posts: 14
Hello Foxidrive

Yeah its working i have put this into the cmd prompt an pdf creator is oepning i have made default printer to be pdfcreator but we have to save each file and i have hundreds file to be converted


Top
   
PostPosted: 10 Aug 2012 06:02 
Offline
Expert

Joined: 23 Dec 2011 13:59
Posts: 3225
Did you happen to read the user manual. I think you will find you answer there.
http://www.pdfforge.org/content/pdfcreator-user-manual


Top
   
PostPosted: 10 Aug 2012 22:27 
Offline

Joined: 09 Aug 2012 12:21
Posts: 14
Hello Squashman

Please check is this correct

C:\Users\mullahshareef\Desktop\Staters\New folder\PDFCreator.exe/PF"C:\Users\mullahshareef\Desktop\Staters\New folder"


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: Yahoo [Bot] and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited