#26192 - 2002-07-31 10:51 AM
copying files to dirs with date
|
belgarion
Fresh Scripter
Registered: 2002-07-31
Posts: 6
|
So i have a disk with files. If a person starts the kix-file, files are automatically processed, but they have to be backed up in my backup-dir on my computer. So far I have:
$sdate = substr( @date, 9, 2 ) + substr( @date, 6, 2 ) + substr( @date, 1, 4 ) md "$sdate" cd "$sdate" (this is still wrong)
the date is converted into a string, the dir is created, but i don't know how to get inside the directory, and how to copy these files to the diretory.
Thanx for the help
|
|
Top
|
|
|
|
#26193 - 2002-07-31 11:02 AM
Re: copying files to dirs with date
|
Breaker
Hey THIS is FUN
   
Registered: 2001-06-15
Posts: 268
Loc: Yorkshire, England
|
Belgarion,
Welcome to the board. Dave Eddings fan, I take it? Never read them myself, but they're supposed to be quite good.
Anyway, to business. I'm not sure I totally understand what you're trying to do - this early in the morning, I'm not blaming that on you! - you have a script that processes some files for you, you want the processed files to be backed up to a folder that is created with the current date, presumably on your local machine - yes?
If I've misunderstood let me know - there are a couple of questions, such as where are these files coming from? Are they created by the kix script, or are they simply being processed by it? Could you post what you have already - as its often easier to see what's going on from the script itself!
Thanks,
Breaker [ 31 July 2002, 11:03: Message edited by: Breaker ]
_________________________
================================================ Breaker
|
|
Top
|
|
|
|
#26194 - 2002-07-31 11:26 AM
Re: copying files to dirs with date
|
belgarion
Fresh Scripter
Registered: 2002-07-31
Posts: 6
|
It's actually a very easy problem, but I'm just starting with Kix.
Other people from my departement have to do payments, for this they insert a floppydisk with the files in the computer.
copy a:\*.* c:\isabel\betalingen cd\ cd isabel cd betalingen ren *.* *.fbf cd\ cd backup KIX32 SORTDATE.KIX
::SORTDATE.KIX $sdate = substr( @date, 9, 2 ) + substr( @date, 6, 2 ) + substr( @date, 1, 4 ) md "$sdate" cd "$sdate"
IF they start convert.bat a little program starts that copies the files, and then renames it, but the originals have to be backed up, not the altered files.
So it's basically just a problem on how to change a directory, and copy files from the floppydisk to my computer
|
|
Top
|
|
|
|
#26195 - 2002-07-31 11:28 AM
Re: copying files to dirs with date
|
belgarion
Fresh Scripter
Registered: 2002-07-31
Posts: 6
|
o and yes the name comes from david eddings
|
|
Top
|
|
|
|
#26197 - 2002-07-31 01:10 PM
Re: copying files to dirs with date
|
belgarion
Fresh Scripter
Registered: 2002-07-31
Posts: 6
|
SO now i have a kixfile with this in it:
Copy a:\*.* c:\isabel\betalingen\*.fbf $sdate = substr( @date, 9, 2 ) + substr( @date, 6, 2 ) + substr( @date, 1, 4 ) md "c:\backup\"+$sdate Copy a:\*.* "c:\backup\"+$sdate
But in the first line, it allready blocks. Is it possible that it doesn't go because I'm working with windows 2000 PRO?
|
|
Top
|
|
|
|
#26202 - 2002-07-31 03:04 PM
Re: copying files to dirs with date
|
belgarion
Fresh Scripter
Registered: 2002-07-31
Posts: 6
|
tnx guys, it works now
My collegues (ok wrong spelling i know, but I'm Dutch-speaking ) will be forever gratefull
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1257 anonymous users online.
|
|
|