Is there any reason you're not wanting to use the Rename procedure that's part of the fpc system library?
I have some FPC code, that isn't working the way it should.
if FileExists(fn+'.PK2') then shell('/usr/bin/mv '+fn+'.PK2
'+fn+'.MIX');
if FileExists(fn+'.PK2') then shell('/usr/bin/mv '+fn+'.PK2
'+fn+'.MIX');
Was this a typo? Or should the first instance of "fn" have a "+" before it as well?
if FileExists(fn+'.PK2') then shell('/usr/bin/mv '+fn+'.PK2
'+fn+'.MIX');
Was this a typo? Or should the first instance of "fn" have a "+"
before it as well?
You're showing you are not a programmer! ;)
+ Is the operator to concatenate two strings together. So you are not puting it just in front of a string or string variable, but between them...
if FileExists(fn+'.PK2') then shell('/usr/bin/mv '+fn+'.PK2
'+fn+'.MIX');
Was this a typo? Or should the first instance of "fn" have a "+" before it as well?
Hello j,
On Thu Jan 26 2017 19:50:18, j b l wrote to All:
I have some FPC code, that isn't working the way it should.
if FileExists(fn+'.PK2') then shell('/usr/bin/mv '+fn+'.PK2
'+fn+'.MIX');
Was this a typo? Or should the first instance of "fn" have a "+" before it as well?
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 910 |
Nodes: | 10 (0 / 10) |
Uptime: | 246:17:48 |
Calls: | 12,118 |
Calls today: | 1 |
Files: | 186,505 |
Messages: | 2,227,438 |