Go Back   Access World Forums > Apps and Windows > Visual Basic

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-23-2019, 10:39 PM   #1
Alhakeem1977
Newly Registered User
 
Join Date: Jun 2017
Posts: 155
Thanks: 72
Thanked 0 Times in 0 Posts
Alhakeem1977 is on a distinguished road
VBScript copy file to folder then cut it and past it in another folder

How can make a VBScript that when a pdf file exist in a folder called 'SOURCE' then three steps have to be done.
Step one: make pdf as a searchable file if possible then reduce the file size.
Step two: copy the file to a folder called 'BACKUP'.
Step three: CUT the file from 'SOURCE' and PAST it in a folder called 'FOR REVIEW'.
The file will not be exist after the hole process in the 'SOURCE' folder.

How can achieve thies stips with a script in vbScript?

Thanks in advance!

Sent from my HUAWEI NXT-L29 using Tapatalk

Alhakeem1977 is offline   Reply With Quote
Old 06-23-2019, 10:53 PM   #2
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 9,447
Thanks: 106
Thanked 2,535 Times in 2,328 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: VBScript copy file to folder then cut it and past it in another folder

Why bother placing it in the SOURCE folder in the first place?
Just save it to the BACKUP folder and copy to FOR REVIEW (or make a second copy)

BTW I've removed the SOLVED tag on the thread.
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 06-23-2019, 11:15 PM   #3
Alhakeem1977
Newly Registered User
 
Join Date: Jun 2017
Posts: 155
Thanks: 72
Thanked 0 Times in 0 Posts
Alhakeem1977 is on a distinguished road
Re: VBScript copy file to folder then cut it and past it in another folder

Quote:
Originally Posted by isladogs View Post
Why bother placing it in the SOURCE folder in the first place?
Just save it to the BACKUP folder and copy to FOR REVIEW (or make a second copy)

BTW I've removed the SOLVED tag on the thread.
Thanks for your prompt response
Because I want to handle the continuity and the sycle of the pdf documents (SOURCE Folder is the output of the scanned documents from scanner) may you can correct me if it's possible that this process can be achieved without duplicates because the loop process will copy and past the exsisting files.

Sent from my HUAWEI NXT-L29 using Tapatalk

Alhakeem1977 is offline   Reply With Quote
Old 06-24-2019, 01:29 AM   #4
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 9,447
Thanks: 106
Thanked 2,535 Times in 2,328 Posts
isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all isladogs is a name known to all
Re: VBScript copy file to folder then cut it and past it in another folder

OK. Unless you can change your scanner settings it looks like you will have to do the extra step.
Similarly, I would suggest you change the scanner settings to create a searchable optimised PDF in the first place. I don't know whether you can alter a non searchable PDF retrospectively.
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 06-24-2019, 01:48 AM   #5
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 10,905
Thanks: 40
Thanked 3,538 Times in 3,419 Posts
CJ_London is just really nice CJ_London is just really nice CJ_London is just really nice CJ_London is just really nice CJ_London is just really nice
Re: VBScript copy file to folder then cut it and past it in another folder

Quote:
make pdf as a searchable file
you will need an API from adobe acrobat (not reader) or similar to do this. Alternatively if you are using office 2013 or later you can use vba code to open the pdf and save as a docx.

Alternatively and it depends on the scanner but there are ones which will scan and save as a text file.
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is online now   Reply With Quote
Old 06-24-2019, 02:24 AM   #6
Alhakeem1977
Newly Registered User
 
Join Date: Jun 2017
Posts: 155
Thanks: 72
Thanked 0 Times in 0 Posts
Alhakeem1977 is on a distinguished road
Re: VBScript copy file to folder then cut it and past it in another folder

Ok I checked the scanner it has an option to create it with searchable file but there is no option to reduce it.

So moving further, how can I automate this process by building a VBScript syntax? I know how to create the Tasks Scheduler to run the VBScript file but I do not know how to build the script.

By the way, is it possible to handle the whole process automatically once the pdf file updated from the scanner to the SOURCE folder by MS Access? Means no need to go to the Access and open it to do the process, Fully automated.

I have to solve this issue ASAP I really need your help guys

Any other suggestions are welcome



Sent from my HUAWEI NXT-L29 using Tapatalk
Alhakeem1977 is offline   Reply With Quote
Old 06-24-2019, 03:29 AM   #7
Alhakeem1977
Newly Registered User
 
Join Date: Jun 2017
Posts: 155
Thanks: 72
Thanked 0 Times in 0 Posts
Alhakeem1977 is on a distinguished road
Re: VBScript copy file to folder then cut it and past it in another folder

Quote:
Originally Posted by isladogs View Post
OK. Unless you can change your scanner settings it looks like you will have to do the extra step.

Similarly, I would suggest you change the scanner settings to create a searchable optimised PDF in the first place. I don't know whether you can alter a non searchable PDF retrospectively.
Please find below my response

Sent from my HUAWEI NXT-L29 using Tapatalk

Alhakeem1977 is offline   Reply With Quote
Old 06-24-2019, 03:30 AM   #8
Alhakeem1977
Newly Registered User
 
Join Date: Jun 2017
Posts: 155
Thanks: 72
Thanked 0 Times in 0 Posts
Alhakeem1977 is on a distinguished road
Re: VBScript copy file to folder then cut it and past it in another folder

Quote:
Originally Posted by CJ_London View Post
you will need an API from adobe acrobat (not reader) or similar to do this. Alternatively if you are using office 2013 or later you can use vba code to open the pdf and save as a docx.



Alternatively and it depends on the scanner but there are ones which will scan and save as a text file.
Please find my response

Sent from my HUAWEI NXT-L29 using Tapatalk

Alhakeem1977 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cut & Past .pdf file from a folder to one another in Microsoft Access Alhakeem1977 Modules & VBA 7 06-18-2019 12:32 PM
Copy File from One Folder to Another feinj Modules & VBA 4 02-28-2014 01:56 PM
copy file on same folder with diffrent name bee55 Modules & VBA 1 10-26-2011 10:42 PM
Copy text file to other folder Prince Modules & VBA 1 10-09-2003 02:28 PM
Set File Name and set destination folder relative to Database Folder? Cosmos75 Modules & VBA 8 05-21-2003 09:11 AM




All times are GMT -8. The time now is 02:32 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World