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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use DOS Move for Multiple files from directory to directory in Foxpro program 1

Status
Not open for further replies.

eboughey1008

Programmer
Jan 6, 2009
31
US
This is simplistic and wrong but I'm trying to move the files instead of copying them if possible. I'm doing it all by hand right now.

**** SIMPLE BEGINNING *****

@ 11,5 say 'Enter Job Number for Return NCOA file: ' get CLIST_NO
READ
CLEAR
SET SAFETY OFF
SET TALK OFF

lcprefix = "e:\working\jobs\"+alltrim(CLIST_NO)+"\"
SET DEFAULT TO "e:\working\jobs\"+alltrim(CLIST_NO)+"\"

***** what I want to accomplish ****

1. Move files with the following info in the filename to my job directory
2. Remove part of the filename from the pdf files (.csv.export.csv.) after they are moved over.

this is just a simple command of how I'm trying to think the command through:

MOVE all instances of files with the (CLIST_NO) AND ".CSV.EXPORT" IN THE FILENAME TO MY JOB DIRECTORY

lcmove = "E:\WORKING\TRUENCOA\EXPORT\NCOA-"+ALLTRIM(CLIST_NO)+".CSV.EXPORT"+.*

!MOVE alltrim(lcmove) ALLTRIM(LCPREFIX) *** obviously doesn't work *****

I'm not sure at all that you can even move all instances of filenames that match or use [highlight #FCE94F]*.*[/highlight] in the command

what the filenames look like. There are always these 3 and
e:\working\truencoa\export\NCOA-52990.CSV.EXPORT.CSV ---- FILENAME STAYS THE SAME
e:\working\truencoa\export\NCOA-52990.CSV.EXPORT.CSV.CASS.PDF ---- ".CSV.EXPORT" IS REMOVED
e:\working\truencoa\export\NCOA-52990.CSV.EXPORT.CSV.NCOA.PDF ---- ".CSV.EXPORT" IS REMOVED


******************** PERHAPS ********************

lcmove = ""E:\WORKING\TRUENCOA\*+ALLTRIM(CLIST_NO)+".CSV.EXPORT.CSV"
lcmoveCASS = ""E:\WORKING\TRUENCOA\*+ALLTRIM(CLIST_NO)+".CSV.EXPORT.CSV.CASS.PDF"
lcmoveNCOA = ""E:\WORKING\TRUENCOA\*+ALLTRIM(CLIST_NO)+".CSV.EXPORT.CSV.NCOA.PDF"

!MOVE alltrim(lcmove) ALLTRIM(LCPREFIX) *** obviously doesn't work *****
!MOVE alltrim(lcmoveCASS) ALLTRIM(LCPREFIX)
!MOVE alltrim(lcmoveNCOA) ALLTRIM(LCPREFIX)

Any help would be so wonderful! I have been working on this for too long... I always have issues with the dos commands inside a foxpro program. You'd think I'd be a pro after all the times I've asked for help on this...
 
Sorry for the pronoun error!

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top