I have the following script with strange results. Took separate lines just for readability. If all on one line same result
let>from=%sailMainDir%\%fnDir%
let>to=%sailMainDir%\%dataDirLog%\%fnOnly%
// can ignore the above, the message output is given below
message>%from% to %to%
CopyFile>from,to
MoveFile>from,to
the message produces:
\a\a\sailMain\new\saildata_14-07-2010_17-27-34.dat
to
\a\a\sailMain\log\saildata_14-07-2010_17-27-34.dat
the log directory (the 'to') however shows
C:\a\a\sailMain\log\saildata.dat
C:\a\a\sailMain\log\saildat3.dat
C:\a\a\sailMain\log\saildat2.dat
C:\a\a\sailMain\log\saildat1.dat
Those 1 2 3 are created by running the script more than once
Am I missing something or is some dos 8.3 renaming taking over? Running on Win Xp SP3 . B.t.w. that the original files in the new directory are all OK
saildata_14-07-2010_17-27-34.dat
etc.
MoveFile CopyFile fall back to DOS 8.3 naming??
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
No. Nothing in Macro Scheduler is forcing 8.3. Macro Scheduler just uses the Windows shell to copy files. So it should do whatever Windows would do. I have never seen it change the name to a 8.3 format, and I was unable to replicate just now with a long filename.
I do note however that you have a CopyFile followed by a MoveFile - are you sure you want to do that? This would copy the file over and then create another copy of the file (suffixed "- Copy" by Windows) in the same folder.
I'm not sure why you're ending up with 8.3. What do the files look like in Windows Explorer? Perhaps it is just the way they are being presented - how are you listing the files?
I do note however that you have a CopyFile followed by a MoveFile - are you sure you want to do that? This would copy the file over and then create another copy of the file (suffixed "- Copy" by Windows) in the same folder.
I'm not sure why you're ending up with 8.3. What do the files look like in Windows Explorer? Perhaps it is just the way they are being presented - how are you listing the files?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Tried to strip my script, but did not succeed to make a test case. The reduced script worked fine. What I did to solve this is make a simple .cmd file (not .bat)
mymove.cmd
move %1 %2 %3
Execute that and the files were moved OK with the long names.
What could cause this is that somehow command.com is executed in stead of cmd.com. The last one is the 16 bit version. I checked my path variables. It is pointing to cmd.com.
b.t.w. running v12 latest release.
mymove.cmd
move %1 %2 %3
Execute that and the files were moved OK with the long names.
What could cause this is that somehow command.com is executed in stead of cmd.com. The last one is the 16 bit version. I checked my path variables. It is pointing to cmd.com.
b.t.w. running v12 latest release.