Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHDIR not working in Windows7 (64 Bit)

Status
Not open for further replies.

Razor1

IS-IT--Management
Nov 21, 2002
81
US
The CHDir command does not seem to work in Windows 7(64 Bit). When I run the code on an XP workstation it places the file in the proper location. When I run the code on Windows 7 (64 Bit) in places the file in the documents folder. I have also hard coded the the change directory and it has no effect.

Any help would be greatly appreciated.

Below is the code
ChDir Application.CurrentProject.path
Open "ftp-cmd.txt" For Output As #FileNo
Print #FileNo, "open " & strFTPsite
Print #FileNo, strUser
Print #FileNo, strPassword
Print #FileNo, "cd " & strOrders
Print #1, "prompt"
Print #1, "lcd \sourceloc"
Print #1, "mput " & strFile
Print #1, "bye"
Close FileNo
Shell "ftp.exe -s:ftp-cmd.txt", vbNormalFocus

Razor1
 
Does the user account that Access is running under have permission to write to that folder?
(you can test this yourself by logging on as this user and trying to save a file to that folder).

John
 
Yes. I found I have to use chdrive command on the windows7. XP will change both drive and directory when using the chdir command.

Thanks for your help

Razor1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top