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

req: folder rename

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0


i am trying to write a small back up program
to backup our motels reservation program on cd-r


SHELL "deltree -y c:\windows\temp\"
SHELL "mkdir c:\windows\temp\global"
SHELL "Copy c:\global\*.* c:\windows\temp\global\*.*"
SHELL "ren c:\windows\temp\global\*.* "


now I am stuck
how can I rename folder to either
a name entered or to todays date
i cannot copy to the cd-r disk
over and over with the same
folder named global
todays date would be nice to rename it to
or an inputed name would work

can anyone help

please any easy way if possible
i am not a programmer
just wanted a small
program when cliked on would
rename and copy global folder to cd-r drive

in qbasic 4.5, 7 or powerbasic 3.2
have both

kurt brown
vacation hotel
autopur@yahoo.com




 
If you know how to use the CALL INTERRUPT, this is all you need.

If not, here's a code snippet.
Load QB using the command line QB/L
Then type this into QB 4.x.
REM untested code below--use at your own risk.
REM $INCLUDE: 'QB.BI'
dirname$="C:\WINDOWS"
dirname$=dirname$+CHR$(0)
newdirname$="C:\JUNK"
newdirname$=newdirname$+CHR$(0)
DIM SHARED regs as RegTypeX
regs.AX=&h5600
regs.DS=VARSEG(dirname$)
regs.DX=SADD(dirname$)
regs.ES=VARSEG(newdirname$)
regs.DI=SADD(newdirname$)
CALL INTERRUPTX(&h21,regs,regs)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top