- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
is there a syntax inside fortran which works as a copy-command (like DELFILESQQ or RENAMEQQ). I can't use the SYSTEM-syntax because of blanks inside the file names.
If yes, please send a short example/description in your answer.
Thanks for help in advance
Frank
is there a syntax inside fortran which works as a copy-command (like DELFILESQQ or RENAMEQQ). I can't use the SYSTEM-syntax because of blanks inside the file names.
If yes, please send a short example/description in your answer.
Thanks for help in advance
Frank
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. a very rough and ready solution :
Code:
use ifwinty character*80 file1, file2 integer(BOOL) :: cp logical :: ires interface integer function CopyFileA (file1,file2,res) !dec$ attributes stdcall, alias:'_CopyFileA@12' :: CopyFileA character*(*) :: file1 [reference] character*(*) :: file2 [reference] logical*4 :: res [reference] end function CopyFileA end interface ires = .false. file1 = "first file.txt"C file2 = "copy of first file.txt"C cp = CopyFileA(file1, file2, ires)
Les
![](/skins/images/E799062D82CA2A220ED12C6FD1960495/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page