I am running a ftp script from a batch file using the shell command. I use this to transfer a text file that I then want to import into a table. I am having a problem with the computer starting the script, but before the transfer is complete, it starts to run the import and the file isn’t available because it is being transferred. Is there a way to put a time delay between the shell command and the docmd.??. I have tried a for-next loop, but that ties up the computer and it seems like the transfer happens slower than ever. Or is the for-next loop the only way to slow down the execution of my code?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
time delay (Access2K, sr1a)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » time delay (Access2K, sr1a)
- This topic has 4 replies, 3 voices, and was last updated 23 years, 1 month ago.
Viewing 2 reply threadsAuthorReplies-
WSGARYPSWANSON
AskWoody Lounger -
WSherworth
AskWoody LoungerMay 24, 2002 at 5:12 pm #590202If you know how long the delay needs to be you can use this function:
Function Pause(ByVal nSecond As Single)
Dim t0 As Single
t0 = Timer
Do While Timer – t0 < nSecond
Dim dummy As Integer
dummy = DoEvents()
If Timer < t0 Then t0 = t0 – 24 * 60 * 60 ' if we cross midnight, back up one day
Loop
End Function
You pause the whole operation by 10 seconds for example by using Pause(10) at the appropriate point in the code.
Peter -
Gwb
AskWoody Lounger
-
WSGARYPSWANSON
AskWoody LoungerMay 24, 2002 at 5:23 pm #590207Will a time delay truly solve your problem. The time delay will need to be based on the size of the file, which, typically is unknown. You need to launch the transfer after the file is completely transferred. If you transfer files to a particular folder, you can test to see if the file is completely written by trying to copy it. You will receive an error message if the file is still being written and you try to copy it. Thus, if you receive an error message, catch the error and re-try copying the file at a later time specified by you. (You could try every ten minutes)
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Very Quarrelsome Taskbar!
by
CWBillow
3 hours, 58 minutes ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
6 hours, 42 minutes ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
8 hours, 1 minute ago -
Is your battery draining?
by
Susan Bradley
39 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
9 hours, 58 minutes ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
10 hours, 34 minutes ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
13 hours, 49 minutes ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
4 hours, 32 minutes ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
7 hours, 3 minutes ago -
National scam day
by
Susan Bradley
9 hours, 59 minutes ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
59 minutes ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
1 day, 11 hours ago -
Tools to support internet discussions
by
Kathy Stevens
19 minutes ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
1 day, 2 hours ago -
AI is good sometimes
by
Susan Bradley
1 day, 18 hours ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
1 day, 8 hours ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
2 days, 19 hours ago -
June KB5060842 update broke DHCP server service
by
Alex5723
2 days, 17 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
2 days, 21 hours ago -
Excessive security alerts
by
WSSebastian42
1 day, 12 hours ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
3 days, 7 hours ago -
Ben’s excellent adventure with Linux
by
Ben Myers
4 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
2 days, 18 hours ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
1 day, 11 hours ago -
OS news from WWDC 2025
by
Will Fastie
22 hours, 1 minute ago -
Need help with graphics…
by
WSBatBytes
2 days, 2 hours ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
3 days, 22 hours ago -
Totally remove or disable BitLocker
by
CWBillow
2 days, 21 hours ago -
Windows 10 gets 6 years of ESU?
by
n0ads
3 days, 1 hour ago -
Apple, Google stores still offer China-based VPNs, report says
by
Nibbled To Death By Ducks
4 days, 9 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.