Short filenames on NT ; Host('xcopy')
Is ther a way I can tell NT to use the full long filename when doing a copy from a forms 4.5 PL/SQL block using the HOST command on NT4 ORACLE7 ?.
null
I finally did it! I donn't really understand why it didn't work the first time, yet here's how it works.
PROCEDURE compile_forms_fs IS
cmdstr varchar2(500);
x_file text_io.file_type;
x_module varchar2(200);
x_output varchar2(200);
n number;
BEGIN
x_file:=text_io.fopen(:blocu.source_path| |'list.bat', 'W');
din directorul curent
cmdstr:='dir '| |:blocu.source_path| |'*.fmb /b > '| |
:blocu.source_path| |'forms_l.txt';
text_io.put(x_file, cmdstr);
text_io.fclose(x_file);
host(:blocu.source_path| |'list.bat', no_screen); -- this gets the .fmb files list
-- why didn't the direct host('dir...') work?
x_file:=text_io.fopen(:blocu.source_path| |'forms_l.txt', 'R');
loop
begin
text_io.get_line(x_file, x_module);
:blocu.dsp_file:='Compilez '| |x_module;
synchronize;
exception
when others then exit ; -- nu mai are ce citi din fisier
end;
begin
compile_1form(x_module);
exception
when others then null;
end;
end loop;
text_io.fclose(x_file);
END;
Similar Messages
-
QuickTime is showing the Windows 7 short filename at the top
All of a sudden in the last couple of weeks, QT has decided to start showing the Windows 7 short filename at the top of the window. What can I do to get the long filename displayed instead? Help!
I believe you are talking about taskbar previews. To enable them you need to change a hidden preference.
# Type '''about:config''' into the location bar and press enter
# Accept the warning message that appears, you will be taken to a list of preferences
# Locate the preference '''browser.taskbar.previews.enable''' and double-click on it to change its value to '''true''' -
Filenames shortened from host dir command
forms 6 - client server -
If I do the following in DOS:
C:\Develop\test>dir
Volume in drive C has no label.
Volume Serial Number is A487-950B
Directory of C:\Develop\test
14/12/2006 13:18 <DIR> .
14/12/2006 13:18 <DIR> ..
14/12/2006 12:16 0 test2_long_name.txt
14/12/2006 12:15 0 text1_long_name.txt
2 File(s) 0 bytes
2 Dir(s) 70,448,463,872 bytes free
C:\Develop\test>dir /b >C:\ALLFILES.TXT
C:\Develop\test>type C:\ALLFILES.TXT
test2_long_name.txt
text1_long_name.txtbut from within a form:
host('dir /b '||:CONTROL.LOAD_DIR ||'> C:\ALLFILES.TMP',NO_SCREEN);produces a file containing
TEST2_~1.TXT
TEXT1_~1.TXT
Is there any way of accessing the full filenames from a Form?The following works...
host('CMD.EXE /C dir /b '||:CONTROL.LOAD_DIR ||'> C:\ALLFILES.TMP',NO_SCREEN);Thank you! -
Problem: short filenames from Windows apps
Whenever I save a file from a Windows application on Solaris, if the filename is 8 characters or less, it converts the filename entirely to lowercase, but with 9 characters or more, it works fine. ie:
1234567890
abcdEFGHI.txt --> abcdEFGHI.txt
abcdEFGH.txt --> abcdefgh.txt
Any ideas?Hi,
via samba, pcnetlink, nfs or what? -
Rename File in Oracle Forms before Copy to another drive
Dear All Seniors
I want to ask that how to rename file before copy it to other drive.
Actually when we get file from drive to open then it that time before copying I want to rename it.
------this code i am using for copying file from first path to other.
DECLARE
filename VARCHAR2(500);
BEGIN
filename := GET_FILE_NAME( File_Filter => 'Files (*.*)|*.*|');
READ_IMAGE_FILE(filename, 'any', 'IMAGE6');
HOST ('xcopy "'|| filename ||'" \\172.172.0.4\Combo_pic\',no_screen);
END;
I am using this code it is working fine, but i did't know how to use it before copying file.
host('cmd /c rename "'||:block3.file_name||'" " '||:block3.file_name_n||' " '); --- for file rename
thanks.Ghulam Yassen wrote:
Dear All Seniors
I want to ask that how to rename file before copy it to other drive.
Actually when we get file from drive to open then it that time before copying I want to rename it.
------this code i am using for copying file from first path to other.
DECLARE
filename VARCHAR2(500);
BEGIN
filename := GET_FILE_NAME( File_Filter => 'Files (*.*)|*.*|');
READ_IMAGE_FILE(filename, 'any', 'IMAGE6');
HOST ('xcopy "'|| filename ||'" \\172.172.0.4\Combo_pic\',no_screen);
END;
I am using this code it is working fine, but i did't know how to use it before copying file.
host('cmd /c rename "'||:block3.file_name||'" " '||:block3.file_name_n||' " '); --- for file renameDear Ghulam Yassen,
As salamualikum
>HOST ('xcopy "'|| filename ||'" \\172.172.0.4\Combo_pic\',no_screen);
Change the above line by the following line. It will rename as well as copy.
HOST ('xcopy "'|| filename ||'" \\172.172.0.4\Combo_pic\'||:EMP_CODE||'.jpg',no_screen); ---here EMP_CODE is a column value.Above code will rename to emp_code value.
Hope this works...
Hamid -
Filename length affects Acrobat review success
When I initiate a shared Acrobat review to my company's server, the e-mailed copy doesn't always get sent via Outlook (although the "_review" PDF and associated XML folder gets saved to the server, as normal). The problem is related to the original PDF's filename. Shorter filenames work, longer ones don't. Could you please tell me the maximum filename length for successfully sending the review document automatically via the Acrobat review process?
Perhaps the length of the file path eats into this max length as well? (Our folder to contain PDF review documents is K:\Acrobat Reviews\_Engineering.)
Thanks!
---Mike, KVH IndustriesHi Mike,
There is no upper file name length as such. But there is an upper limit to the number of characters in the path of the comment repository. Comment repository is located at your server which you have selected to host your review. The repository folder name contains the name of the file_review.pdf along with some other characters. There is also an xml inside this which actually contains your comments. The complete path of this xml including the xml name should not be greater than 226 characters.
But if this complete path is greater than this upper limit then acrobat does not let the user initiate shared review in the first place. An error "The file name(s) would be too long for the destination folder. You can shorten the file name and try again, or try a location that has a shorter path." is thrown at the profile name step.
There might be some other issue as well due to which the e-mailed copy doesn't always get sent via Outlook (although the "_review" PDF and associated XML folder gets saved to the server. Could you give me some more details about the kind of server you are using and are you sending it as attachment or link? Also, where is orignal file located (local machine or server)?
Thanks,
Abhilasha -
Cannot delete file: filename too long
Sometime ago, I made a copy of a hierarchy of folders under my "Users" folder to another drive as a quick backup. I no longer need this copy of folders and files. So when I tried to delete these files I got a message that some filenames are too long. When
I look at these files they mostly seem to be part of Internet Explorer temp directory, and also some files used by Mozilla Thunderbird, so they were likely created by these utilities on purpose. I cannot rename them to shorter names, or even move them to lower
folders. I can't even copy their filenames to show you what these filenames are! When I use the DOS prompt's "dir /x" command these files do not even have any 8.3 short filenames either, which I could've used to delete them with. There are over 400 of these
files!
I know what the problem is, the Windows OS has a limit of somewhere around 250 characters for filenames and complete pathnames. I've seen some utilities advertised saying that they can delete these files, but they all require money. Anything that's free?
Yousuf KhanHi,
It is just for testing. It is good since the files can be deleted in Linux.
However, if you don't have Linux, it needs to find the way to delete the files under Windows.
Since the files are located in Internet Explorer temp directory, you could use Disk Cleanup to clear the Temporary Internet Files.
Also, check if the following KB is helpful. It has several methods. Go to check if 8.3 name creation is disabled.
http://support.microsoft.com/default.aspx?scid=kb;en-us;320081
Best Regards,
L.S
Regarding it being in the Internet Explorer temp directory, it actually wasn't. Remember I said in the original posting that this was in a backup directory of these directories, so Disk Cleanup has no way of knowing that this belongs to Internet Explorer
or anything else. Also there was a Thunderbird directory having the same issues as well, which Disk Cleanup wouldn't have touched no matter what.
Okay, I checked out the state of the filesystem registry. The "NtfsDisable8dot3NameCreation" entry in the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" is set to non-zero, meaning the feature is in effect. Interestingly it was set to 2
rather than 1, but I doubt that makes a difference.
Even if I disable this feature right now, all previously created files still won't be assigned the 8.3 filenames, just only those files that are newly created will have the 8.3 filenames available.
Yousuf Khan -
Filenames getting truncated in Save for Web AppleScript
Hey all, running CS4 on an Apple Macbook Pro (using OS X 10.5.6). I am creating an AppleScript that saves out a number of files with different filenames using save for web. The problem is that Photoshop CS4 is truncating the filename, and using a shorter filename is not an option (there is identifying info in the filename that I need to retain). Is there a way within the script I can set it to allow longer filenames? My current save for the web script line looks as follows:
export current document in file filename as save for web with options {quality:60, web format:JPEG}
What happens is that a filename like this:
CANON-PRO8000MKII-ideal-ideal-24.jpg
gets cut down to this:
CANON-PRO8000MKII-ideal-ideal#0
I believe that there there is a PShop bug here that has a hard-coded limit on the filename, but which does not happen if you enter the file name manually: if I go into the save for web dialog and enter the full filename, it works fine. Any ideas?I recall having this problem too, my solution was to truncate the file name in the script prior to the save, then rename the saved file.
e.g.
if length of theNewFileName > 31 then
set theTempFileName to theNewFileName
set theNewFileName to (text 1 through (31 - (length of theFileExtension) - 1) of theNewFileName & "." & theFileExtension) as string
end if
set theNewFile to (saveToFolder & theNewFileName) as string
-- Save the file here
if theTempFileName = "" then
-- File name wasn't truncated
else
-- Rename truncated file
tell application "Finder"
try
set name of (theNewFile as alias) to theTempFileName
on error errMsg number ERRNUM
display dialog "Error renaming file - " & errMsg
end try
end tell
end if -
Windows XP, Java and long filenames when running application from a server
Hi,
I've been struggling with this for a while, can't understand why Windows XP seems to give me 8.3-filenames with ~ (tilde) instead of the full file- and path-names.
I've added a key in the registry, when a user right-clicks on a txt-file they get an option to open the file using my program. The key maps to:
javaw.exe -jar "\\networkdrive\automapper.jar" "\\networkdrive\Automapper.cfg" "%1"This basically means that javaw will be used to execute my automapper.jar and the automapper.cfg and filename/path will be added as parameters to my java-program. Notice that my jar-file resides on a network-server and not on my local machine. This works just fine though.
However, when I read the supplied filename in my java-code it is always in Windows 8.3-format using ~ to represent the missing chars. This is not a huge problem since everything works. The problem is that I convert the file and save it with a different file-ending, but with the same name (before the suffix). This means that the user runs my program on:
this_is_a_long_file_name.txtand ends up with his original file and my new file named something like:
this_i~1.qqqwhich admittedly looks ugly.
If I run the application locally on my machine everything works fine and the long file names seems to handled correctly. The problem only arises because the program is run from a server. This is a microsoft network, I do not know anything else about it, sorry.
Now I know, this is not strictly java-related, but I'm running out of options here and thought that perhaps one of you have solved this before. An option would be that I myself convert the short-filename to a long one, if that is possible? Any pointers would be greatly appreciated! If you don't know the answer, but know a good place to ask I would appreciate that as well.It seems to me that if a File (in the java-sense) is created with a 8.3-path it retains that path, meaning that this code will always give the same result in both printLn-statements:
System.out.Println("input: " + args[2]);
File file = new File(args[2]
System.out.Println("output: " + file.getName());will give the output
input: very_long_file_name_here.txt
output: very_long_file_name_here.txt
or
input: very_~1.txt
output: very_~1.txt
regards,
martin -
Heres something odd i have just noticed...
using dos the contents of my directories "used" to look like this:
c:\jEdu\JHTP\chptr3>dir
Ex3_1 (.java file)
Ex3_1 (.class file)
Ex3_2
Ex3_2
Ex3_3
Ex3_3
Ex3_4
Ex3_4
then using explorer i rearranged my dir names & copied my workinto my
new directory structure...and my filenames were changed...
c:\jEdu\JHTP\exerc\chptr3>dir
Ex3_1~1 java
Ex3_1~1 class
Ex3_2~1
Ex3_2~1
Ex3_3~1
Ex3_3~1
Ex3_4~1
Ex3_4~1
i know that the ~ means that the filename was too long...
but as you can see i have short filenames, i deliberately picked short filenames based on chapter & exercise numbers to explicitly avoid this problem... so what has happened that my filenames in dos have ~ added to them? In explorer they do not show the ~, they show the old names like
Ex3_2 java file (forte)
...i dont know.. does it matter?
have re-installed jdk & still havin trouble executing applets...
...trying to work out the bug, lets not go over whats wrong with the applet code... did that stuff all last week.What you're seeing is normal. My 98SE uses a "~" in all .java and .class names (even short ones) when viewing the names in DOS. This is due to the truncation of .java to .jav and .class to .cla.
Examples:
Long File Name ==> DOS File Name
AnyLongName.java ==> ANYLON~1.JAV
OtherLongName.class ==> OTHERL~1.CLA
Button.java ==> BUTTON~1.JAV
Actor.class ==> ACTOR~1>CLA
ABC.java ==> ABC~1.JAV
A.java ==> A~1.JAV -
Hello to all forms developers !
I have a problem with Forms 6i (client/server). I want the user to select multiple files from a directory. I know this can be done using the OpenFileEx function of the d2kwutil library. But this function only returns a string which max. length is 4096 characters. This restricts the number of selectable files. So I tried another way : I used the HOST built-in to generate a file containing all filenames, like this :
host('dir /b > files.txt', no_screen) and then read out the filenames with routines of text_io package.
The parameter /b for the dir command lists only the filenames.
But to my surprise filenames longer than 8 characters are shortened to only 8 characters so that these filenames cannot be used by other routines.
Did anyone else face and solve this problem and share his experience with me ?
Regards
Kaiif you have d2kwutil library you can use :
win_api_directory_list.FirstFile and win_api_directory_list.NextFile functions. Something like :
WHEN-BUTTON-PRESSED Trigger :
declare
hSearch PLS_INTEGER;
vcFile VARCHAR2(60);
bIsDir BOOLEAN;
vcLDir VARCHAR2(1);
vcRDir VARCHAR2(1);
begin
hSearch := win_api_directory_list.FirstFile(:directory_list.directory, vcFile, bIsDir, toBoolean(:directory_list.exceptions));
:directory_list.result := IsDir(vcFile, bIsDir);
LOOP
win_api_directory_list.NextFile(hSearch, vcFile, bIsDir, toBoolean(:directory_list.exceptions));
EXIT when vcFile is null;
:directory_list.result := :directory_list.result||chr(10)||IsDir(vcFile, bIsDir);
end LOOP;
win_api_directory_list.CloseSearch(hSearch);
end;
:directory_list.directory is item which contain folder which you want to list. You can choose folder with function:
begin
:directory_list.directory := get_file_name(:directory_list.directory,NULL,NULL,'Select a Folder to list',OPEN_FILE,FALSE)||'\*.*';
end;
Item :directory_list.result is result item where it will be stored all file names which exist in folder (instead of this you can create e.g PL/SQL table which will handle all files which is listed in folder. -
Host Command Problems on 9i Unix
I am using web froms 9i running on a Unix server with 9iasr2. I am trying to manipulate files on the server not the client. I have tried:
host('rm -f /mypath/filename.txt')
host('rm -f /mypath/filename.txt',NO_SCREEN)
host('touch /mypath/filename.txt')
host('touch /mypath/filename.txt', NO_SCREEN)
host('mv /mypath/file1.txt /mypath/file2.txt')
The file I am trying to delete is one that was transfered using the webutil file transfer.
I have tried to check the status with:
IF NOT Form_Success THEN
Message('Error -- Message not sent.');
ELSE
Message('Message Sent.');
END IF;
I always get back 'Error...'
The directories have permission open to everyone. Therefore I would of expected no problems with doing a touch to create a file.
Any ideas?Thanks Ino. That was it, the full path for the unix command itself was missing. I knew it was something simple. =)
-
Absolutely INFURIATING.
I have spent absolute hours building a photo album for the first year or my sons life. Sorting through quite literally thousands and thousands of images. Got a brilliant looking album using 177 of them.
Now everytime I try to check out it won't get past page 1 of building the book.
It says the following "There is a problem with the photo with the filename "null". The full resolution version of this photo either cannot be located or is corrupt. Please replace this photo or delete it from your book.".
The images all look perfect. I have even tried taking them out and re adding the first page images from the library.
Same problem.
This is so annoying. So far I have NOT been happy with this iphoto application having nothing but problems with missing thumbnails. Corrupted images. Things that have never happened to me using a windows machine.Do the filenames contain special characters, like "ä,ü,..." or white space or are the vry long? Is there anything special about the image format? Try to export the edited versions in that case and reimport it with a different, shorter filename.
For testing, create a new book with only the images you want to check.
If this does not fix it, try rebuilding. Depress the option and command keys, launch iPhoto and rebuild the library. -
DBMS_JAVA Permissions & Host Procedure Errors
I have a package which calls a procedure "Host" (all source below) to execute a command.
Everything was working fine, except I was't able to see the DBMS_output results.
So, I tried to get the DBMS_Java.Set_output to working by playing with the dbms_Java.Grant_permission
which now have caused my "Host" to no longer work anymore. I see get a message "The handle is invalid."
Below are the 3 Grant Permission statements I issued with a specific user "LIB" as was logged in as,
I believe somehow stepped on the Sys priveleges or something.
Any clue help what I did and how to revoke / regrant the persmission?
Also how to get the output to appear?
Code from Package:
DBMS_JAVA.SET_OUTPUT(100000);
Host(xcopy/y "y:\file1.DAT" "y:\File1\");
Commands I issued:
Exec dbms_java.grant_permission('LIB', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
Exec dbms_java.grant_permission('LIB', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
Exec dbms_java.grant_permission('LIB', 'SYS:java.io.FilePermission','*', 'execute');
CREATE OR REPLACE PROCEDURE host (p_command IN VARCHAR2)
AS LANGUAGE JAVA
NAME 'Host.executeCommand (java.lang.String)';
create or replace and compile java source named host as
import java.io.*;
public class Host {
public static void executeCommand(String command) {
try { String[] finalCommand;
if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1) {
finalCommand = new String[4];
finalCommand[0] = "C:\\winnt\\system32\\cmd.exe";
finalCommand[1] = "/y";
finalCommand[2] = "/c";
finalCommand[3] = command;
} else { // Linux or Unix System
finalCommand = new String[3];
finalCommand[0] = "/bin/ksh";
finalCommand[1] = "-c";
finalCommand[2] = command; }
// Execute the command...
final Process pr = Runtime.getRuntime().exec(finalCommand);
// Capture output from STDOUT...
BufferedReader br_in = null;
try {
br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
String buff = null;
while ((buff = br_in.readLine()) != null) {
System.out.println("stdout: " + buff);
try {Thread.sleep(100); } catch(Exception e) {} }
br_in.close();
} catch (IOException ioe) {
System.out.println("Error printing process output.");
ioe.printStackTrace();
} finally { try { br_in.close(); } catch (Exception ex) {} }
// Capture output from STDERR...
BufferedReader br_err = null;
try { br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
String buff = null;
while ((buff = br_err.readLine()) != null) {
System.out.println("stderr: " + buff);
try {Thread.sleep(100); } catch(Exception e) {}}
br_err.close();
} catch (IOException ioe) { System.out.println("Error printing execution errors.");
ioe.printStackTrace();
} finally { try { br_err.close();
} catch (Exception ex) {} } }
catch (Exception ex) { System.out.println(ex.getLocalizedMessage()); } }};Hi Kabeer,
This is not permission issue problem, because you receive NULL pointer exception. If, database user doesn't have access to the network java.security.AccessControlException is thrown.
I think, that you have not executed:
call sdo_mvclient.createmapviewerclient(
'http://www.mycorp.com:8888/mapviewer/omserver') ;
in the database session, before using PL/SQL MapViewer API. And, if you really have not executed this, then you will receive null pointer exception, because there is no information about remote MapViewer service in the database session.
You should follow the steps described in Section 6.2 of MapViewer 11EA1 User Guide. 6.2.1 - network access, 6.2.2 - MapViewer handle declaration (session scope).
I have deployed mvclient.jar and successfully using remote MapViewer service. Database and Mapviewer are on the different machines and network.
So, I think your problem is, that you have not declared address of remote MapViewer server in the session. According to documentation it should be declared for each session.
Regards,
Andrejus -
CD Joliet File System (long filenames)
On the Solaris 8 platform on Intel, I have the following problem. When I mount CDs that were written using the Joliet (Windows long filenames) file system, I can only see the 8.3 short filenames. On other unix systems (linux,sco), I can see the long filenames. Is there a way to enable the long filenames ?
Solaris has no support for the "joliet" extension to iso9660. But
for many years, it has support for "rock-ridge" extensions. Rock-Ridge
gives you long filenames (>8.3 and >64 (!)), symlinks, user & group IDs,
etc, ...
Please use "rock-ridge" extensions when you make a CD for unix systems.
If you burn your own CDR, you can use the "mkisofs" command to
generate iso9660 filesystems with both "joliet" and "rock-ridge"
(mkisofs options -J -r/-R)
Maybe you are looking for
-
How to regain access to public folder items
Hi All, We have a few public folder items (mainly calendars) for which i (the admin) have no(or limited) access to. In outlook 2010 if i go to the properties of the public calendar i can only see an entry for Administrators for which has the access o
-
Banking Vendor Info not updated from HR Banking infotype
Hi Gurus, I have an issue and I can't quite for sure know how to solve it. My HR team are able to change the banking info of the vendors/employees( employees are also treated as vendors) .... When we run a report or job for employee's direct depo
-
View Deleted Sales Order by material
I need to know in that sales order has been a material because when we run MRP, system creates purchase requisition for requeriments of sales order, ok? But, after if user deletes sales order, the purchase requisition created is incorrect but purchas
-
Unable to add Package to WinPE image
I am trying to add a package to a WinPE following the tutorial at http://technet.microsoft.com/en-us/library/hh824926.aspx . I keep getting "The specified package is not applicable to this image". The only hint I saw was make sure that your are mat
-
User syncing from one DC to another
Dear friends, Let me tell you the details. I have domain a domain A and domain B, created trust between the domains. Joined machines to Domain A and can login as Domain B user. We have an exchange in domain B and the Domain A users have mailboxes in