Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Archiving PDFs

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,26525
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Archiving PDFs
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Archiving PDFs - 9/28/2005 9:18:40 PM   
  maxjr

 

Posts: 0
Score: 0
Joined: 9/28/2005
Status: offline
Original message moved by TNO
Reason : This section is meant for posting completed scripts only (Show and tell)
In a weekly basis I have to Archive about 1500-2000 PDF files. Here is a small structure:

 
In a server called
PPVolume

 
Folder name
iplogin

 
and another folder called 1_Monday their are 10 folders I will just list one:

BOWIE
 
some files are dropped in that folder with a very specific naming convention like BTHGZ2092805.1-17
 
In that folder their is 1 subfolders called
DONE
 
with another sub folder called
Job_1 some files are dropped in that folder with a the same naming convention like BTHGZ2092805.18-20

 
What I would like is to have those files (BTHGZ2092805) to be moved into a in a sever called
\\Asura\Speedflow_Q
and have all the files moved to a Hot_Folder called
Archived
 
Then they will automactically move to a folder called Archive_Out..no need to script this becaseu its done by software that generated the PDF file.

Once the 1500-2000 PDF files have processed through the Hot_Folder system I would like for them to move from Archive_Out to a Server Called
 
GS1

 
Into a folder called
FINAL

but I would like the Script to automatically make a weekly folder for example
 
090505 to 091005       09month, 05date, 05year

Then I would like for a Script to Automatically take the first 5 digits of the Specific naming convention to make a folder with the 5 digit name of the
PDF
for example:
 
BTHGZ2092805.18-20.pdf & make a folder called:
BTHGZ

 
3 months ago I made .bat script file & succeeded but I have made a 52 folders with 52 scripts for the entire year then I know when the year is over I would need to re-write another 52 folders & 52 scripts. I ran into this site last night & I thought I give it a shot. I do want to learn VBS just like I learned some scripting for .bat...can someone help? MXJR
 
 
Post #: 1
 
 RE: Archiving PDFs - 9/28/2005 10:29:36 PM   
  Zifter


Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
Hi maxjr and


I couldn't completely follow your structure and what you are trying to achieve, but here is some information to get you started with a script.

In order to move,copy,delete,create,... files and/or folders, you can use the FileSystemObject.
Information about the FileSystemObject on MSDN
Information about the FileSystemObject on DevGuru

I use the following code to split the date/time into seperate variables, so you can put them in any order you want.
      This will take the current date and time and split it into seperate variables and will put a trailing zero where necessary. If you want to use another date/time instead of the current one, you just of to change the second statement accordignly.

And finally, in case you want only the first five characters of a string, you can use the Left() function.
Left("BTHGZ2092805.18-20.pdf",5)  => "BTHGZ"
For other string manipulation functions check w3schools


See how far you get with this information (lots of other info can be found on these three sites) and don't hasitate to post any problem or question you might have (concerning VbScript of course, there are other forums for other topics ;-)

HTH


<edit>
... and will put a trailing zero where necessary ...
obviously should have been
... and will put a leading zero where necessary ...
</edit>

< Message edited by Zifter -- 9/29/2005 12:56:37 AM >

(in reply to maxjr)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Archiving PDFs Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts